You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
googleai: Add support for Gemini 3 thought_signature parameter #1464
When using Gemini 3 models (e.g., gemini-3-flash-preview), the API returns an error requiring a thought_signature parameter:
googleapi: Error 400: Thought signature is required for thinking models.
Please set `thought_signature` to a thought signature from a previous response,
or to `INCLUDE_THOUGHTS_NEW_CONVERSATION` to start a new conversation.
Gemini 3 introduced a new "thinking" feature where the model can show its reasoning process. This requires:
Setting thought_signature: "INCLUDE_THOUGHTS_NEW_CONVERSATION" for new conversations
Passing back the thought_signature from previous responses for follow-up messages
Proposed Solution
Add ThoughtSignature option to googleai.Options
Handle thought_signature in request building
Parse and expose thought_signature from responses for multi-turn conversations
Consider auto-handling for agentic loops (tool calling)
I started looking into implementing the ThoughtSignature support for Gemini 3.0, but I hit a blocker regarding our current dependency.
langchaingo is currently using the legacy github.com/google/generative-ai-go SDK. According to Google's official notice, this SDK reached End-of-Life on Nov 30, 2025, and is in "critical bug fixes only" mode. New features like Gemini 3.0's "Thinking" capabilities are exclusively available in the new unified SDK (google.golang.org/genai).
Conclusion: We cannot implement this feature on the current driver.
Proposal: instead of refactoring the existing llms/googleai package (which would be a massive breaking change), I propose we create a new provider package (e.g., llms/google_genai or llms/googleai_v2) using the new SDK. This would allow users to access Gemini 3.0 features immediately while keeping backward compatibility for the legacy implementation until we decide to drop it.
@maintainers, does this approach align with your roadmap? If so, I can start scaffolding the new provider.
Guys, I've confirmed it. The legacy SDK doesn't support Gemini 3.0 Thinking mode because it doesn't expose the necessary thinking signatures for multi-turn.
I created a Proof of Concept (PoC) with the new SDK (google.golang.org/genai) and managed to maintain the context by passing the raw genai.Part objects in the history.
Activity
ju4nv1e1r4 commentedon Jan 23, 2026
Hi everyone,
I started looking into implementing the ThoughtSignature support for Gemini 3.0, but I hit a blocker regarding our current dependency.
langchaingo is currently using the legacy github.com/google/generative-ai-go SDK. According to Google's official notice, this SDK reached End-of-Life on Nov 30, 2025, and is in "critical bug fixes only" mode. New features like Gemini 3.0's "Thinking" capabilities are exclusively available in the new unified SDK (google.golang.org/genai).
Conclusion: We cannot implement this feature on the current driver.
Proposal: instead of refactoring the existing llms/googleai package (which would be a massive breaking change), I propose we create a new provider package (e.g., llms/google_genai or llms/googleai_v2) using the new SDK. This would allow users to access Gemini 3.0 features immediately while keeping backward compatibility for the legacy implementation until we decide to drop it.
@maintainers, does this approach align with your roadmap? If so, I can start scaffolding the new provider.
ju4nv1e1r4 commentedon Jan 23, 2026
Guys, I've confirmed it. The legacy SDK doesn't support Gemini 3.0 Thinking mode because it doesn't expose the necessary thinking signatures for multi-turn.
I created a Proof of Concept (PoC) with the new SDK (google.golang.org/genai) and managed to maintain the context by passing the raw genai.Part objects in the history.
Minimum code for PoC:
For LangChainGo, we will need to store these Parts in the Metadata field of the LangChain messages, since the content string is not sufficient.
fix(ai-node): use Gemini 2.5 models instead of 3.0
sunyan1120 commentedon Feb 28, 2026
(e.g., llms/google_genai or llms/googleai_v2) Hi, When is this new SDK expected to go live
ju4nv1e1r4 commentedon Feb 28, 2026
I really want to implement it but I think it's more appropriate to wait for maintainers opinion about it.