Skip to content

Gemini 3 Pro function calling fails with missing thought_signature after multiple tool uses #149

@nklisch

Description

@nklisch

When using Gemini 3 Pro (gemini-3-pro-preview) with ADK JS 0.3.0 and @google/genai 1.41.0, multi-turn function calling fails with
a 400 error after 3-4 tool calls. The API reports a missing thought_signature on a functionCall content block.

Error

{
"error": {
"code": 400,
"message": "Unable to submit request because function call getRecentSleep in the 4. content block is missing a
thought_signature."
}
}

Environment

  • @google/adk: 0.3.0
  • @google/genai: 1.41.0
  • Model: gemini-3-pro-preview
  • Backend: Vertex AI (GOOGLE_GENAI_USE_VERTEXAI=true)
  • Session service: InMemorySessionService
  • Thinking config: { thinkingLevel: "HIGH" } (also reproduces with default/no explicit config)

Steps to Reproduce

  1. Create an LlmAgent with gemini-3-pro-preview and multiple FunctionTools
  2. Send a prompt that triggers 2+ sequential tool calls
  3. On the 3rd-4th tool call, the API returns a 400 about a missing thought_signature

Expected Behavior

ADK JS should preserve thoughtSignature fields from model responses and include them in subsequent requests, maintaining the
model's reasoning context across multi-turn function calling.

Context

Gemini 3 enforces strict validation on thought signatures during function calling (unlike 2.5 where it was optional). The Thought
Signatures docs state official SDKs handle this automatically, but ADK JS appears to drop them when building conversation history.

Fixed in other libraries:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions