litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: Gemini 3.0 requires a thought_signature for tool calls

Open renning22 opened this issue 1 month ago • 1 comments

What happened?

Gemini 3.0 requires a thought_signature for tool calls, but litellm doesn't preserve this signature in streaming mode, causing errors on subsequent turns.

Relevant log output

[STREAM] Processing error: litellm.ServiceUnavailableError: litellm.MidStreamFallbackError: litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\n  "error": {\n    "code": 400,\n    "message": "Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:get_latest_news_summary` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",\n    "status": "INVALID_ARGUMENT"\n  }\n}\n' Original exception: BadRequestError: litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\n  "error": {\n    "code": 400,\n    "message": "Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:get_latest_news_summary` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.",\n    "status": "INVALID_ARGUMENT"\n  }\n}\n'

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.80.0

Twitter / LinkedIn details

No response

renning22 avatar Nov 20 '25 22:11 renning22

Hey, Looks like there is a PR open for this fix: https://github.com/BerriAI/litellm/pull/16895

Mitravasu avatar Nov 21 '25 02:11 Mitravasu

@renning22 This should be fixed in the latest release. Can you check? I can reopen the issue if it still doesn't work

Sameerlite avatar Dec 01 '25 03:12 Sameerlite

@renning22 This should be fixed in the latest release. Can you check? I can reopen the issue if it still doesn't work

thanks, confirm fixed!

renning22 avatar Dec 02 '25 07:12 renning22