Function call is missing a thought_signature - Claude Code
Quick fix
Use the community cc-switch-gemini-fixer patch, or inject skip_thought_signature_validator into history messages, to bypass the signature validation.
Symptom
Section titled “Symptom”API Error: 400 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:Bash` , position 64. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details.Google Gemini 3.x and Thinking-capable models use a stateless reasoning chain for tool calls: a functionCall carries an encrypted credential, thought_signature, and requires it to be sent back verbatim with the subsequent functionResponse. Translating the Anthropic protocol into the Gemini format, CC Switch drops that field while passing the message context through, so the Google API rejects the request with a 400. Separately, the User location is not supported some users see is an API region restriction — a different 400 variant.
Download and run the community stopgap patch cc-switch-gemini-fixer, which handles passing the Gemini response signature through automatically.
Alternatively, when building history messages containing a functionCall in the proxy conversion layer, inject "thought_signature": "skip_thought_signature_validator" by default to bypass the official validation.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- Can I use this patch on macOS?
- Yes — community developers provide a macOS build of the cc-switch-gemini-fixer patch.
- Is User location is not supported also a signature problem?
- No. That is the Google Gemini API restricting your current network region, unrelated to a missing thought_signature. Switch to a proxy node in a supported region.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.