Skip to content

[Bug] Gemini 2.5 models fail with "missing thought_signature in functionCall parts" error #583

Description

@BurakAytas

Description

When using Gemini 2.5 Flash or 2.5 Pro models via Google AI Studio API, tool calls fail with a 400 error:

API Error: 400 [{"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.","status":"INVALID_ARGUMENT"}}]

Steps to Reproduce

  1. Configure openclaude with a Gemini 2.5 Flash/Pro model via AI Studio API key
  2. Use any MCP plugin that triggers a tool call (e.g. mcp__plugin_claude-mem_mcp-search__search)
  3. The first tool call fails with the above error

Expected Behavior

Tool calls should work correctly with Gemini 2.5 thinking models. The thought_signature from Gemini's response
should be preserved and sent back in the functionResponse.

Workaround

  • Use gemini-2.0-flash (no thinking, no signature required)
  • Or disable thinking with thinkingBudget: 0 (if supported)

Environment

  • openclaude version: 0.1.8
  • Model: gemini-2.5-flash (via AI Studio)
  • OS: Linux Mint

Reference

Google's documentation on thought signatures:
https://ai.google.dev/gemini-api/docs/thought-signatures

Related issues in similar projects:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions