Expected Behavior

Support for latest parameters like thinkingConfig which is missing from the API right now

Current Behavior

Missing API from ChatConfig

Context

Right now, because of this I can't use thinkingConfig for gemini 2.5 and it might trigger "thinking" even if I don't want to because it is enabled by default which results in a LOT of tokens usage.

Comment From: argmnt

Seems like under org.springframework.ai.vertexai.gemini VertexAiGeminiChatModel class uses google.cloud.vertexai.v1.GenerationConfig (1.22.0) and this comes from Google client SDK and this class does not support thinkingConfig since spring-ai v1.0.0 uses com.google.api.grpc:proto-google-cloud-vertexai-v1:1.22.0.

@markpollack Is it planned to integrate the newer versions of Google Client SDK at the moment?

Cause seems like newer SDKs supports thinkingConfig

Newer Version Google Client SDK

Thanks for answer in advance

Comment From: ddobrin

Please be advised that Google has released the Google Gen AI SDK, in GA since Google IO 2025 at this link

It provides access to Gemini 2.5 and 2.0 models using both API Key and credentials.

This is the SDK you would be looking for. As it has just been released a week ago, support in Spring AI is pending and will become available.

CC: @markpollack @tzolov @ThomasVitale

Comment From: markpollack

Yes, thanks for the pointer.

Comment From: RyanHowell30

Hey @markpollack , just wanted to circle back on this issue. I see it's planned for the release today.

We are seeing pretty high unexpected costs due to thinking being auto-enabled - is this issue still on track for release today? It would be great to get observability on this invisible cost

Comment From: ddobrin

@RyanHowell30 The Vertex libraries which have been party supported in pre-releases and 1.0 and 1.0.1 do not support Thinking config.

It is supported only in the new Google Gen AI SDK and the Gemini models from 2.x and up.

You would have to switch your codebase to the new Spring AI Google Gen AI library, once it released, and can control it there.