Hello everyone,
I am encountering a blocking 400 INVALID_ARGUMENT error when running function calls / tool use with gemini3.7 flash via an agent integration in VS Code.
Model: gemini3.7 flash
Integration: VS Code coding agent using tool calling (chat-completions compatibility endpoint / custom endpoint)
Trigger: Calling local agent tools (e.g., default_api:navigate_page or default_api:read_page)
Error Details
The API rejects the request with the following payload:
JSON
{
“error”: {
“code”: 400,
“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:read_page , position 3. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.”,
“status”: “INVALID_ARGUMENT”
}
}
Is there a configuration option or header to make thought_signature optional (or trigger a fallback/warning instead of a fatal 400 rejection) when interacting via standard third-party clients and IDE tool runners?
What is the recommended workaround for third-party tools that do not yet generate or pass thought_signature in their functionCall objects?
Any advice or temporary fix to prevent this rejection would be greatly appreciated.
Thank you!