Skip to content

[Bug]: Thought Signatures not returned with Responses API for Gemini 3 #17469

@vincrichard

Description

@vincrichard

What happened?

Hello,
When using the /responses api, the thought signature is not returned.

Is it plan to support the responses api for gemini3 as well ? I have been trying to use for tool calls, but without the tool signature, there isn't much we can do.

I have been using aresponses with gemini/gemini-3-pro-preview

Relevant log output

input to aresponses litellm


  "model": "gemini/gemini-3-pro-preview",
  "stream": false,
  "num_retries": 5,
  "drop_params": true,
  "temperature": 1.0,
  "reasoning_effort": "low",
  "max_tokens": 4096,
  "tools": [
    {
      "name": "get_horoscope",
      "parameters": {
        "type": "object",
        "properties": {
          "sign": {
            "type": "string",
            "description": "An astrological sign like Taurus or Aquarius"
          }
        },
        "required": [
          "sign"
        ]
      },
      "strict": null,
      "type": "function",
      "description": "Get today's horoscope for an astrological sign."
    }
  ],
  "input": [
    {
      "type": "message",
      "content": "You are a helpful assistant. You first think about the reasoning process in the mind and then provide the user with the answer.",
      "role": "system"
    },
    {
      "type": "message",
      "content": "What is my horoscope for today? My sign is Taurus.",
      "role": "user"
    }
  ]
}

Model dump output of the ResponsesAPIResponse object

{
  "id": "resp_bGl0ZWxsbTpjdXN0b21fbGxtX3Byb3ZpZGVyOmdlbWluaTttb2RlbF9pZDpOb25lO3Jlc3BvbnNlX2lkOk1EOHhhZjdrSWJlRC04WVAycW50LVFN",
  "created_at": 1764835114,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "metadata": {},
  "model": "gemini-3-pro-preview",
  "object": "chat.completion",
  "output": [
    {
      "type": "reasoning",
      "id": "rs_7209472162028847676",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "**Taurus Horoscope - Let's Get This Done!**\n\nOkay, so the user wants their Taurus horoscope for today.  Easy peasy.  They've been crystal clear about their sign. And thankfully, I've got this nifty `get_horoscope` tool that's just perfect for the job.  The prompt even practically wrote the code for me! They've already specified `sign='Taurus'`, so no ambiguity there.  No need for any fussy refinement either, which is always a bonus.  Alright, let's fire up that tool and get them the astrological insights they're after.  Consider it done.\n\n\n",
          "annotations": []
        }
      ]
    },
    {
      "type": "message",
      "id": "MD8xaf7kIbeD-8YP2qnt-QM",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": null,
          "annotations": []
        }
      ]
    },
    {
      "arguments": "{\"sign\": \"Taurus\"}",
      "call_id": "call_0e05ace67f524b7ca11d6e3da971",
      "name": "get_horoscope",
      "type": "function_call",
      "id": "call_0e05ace67f524b7ca11d6e3da971",
      "status": "completed"
    }
  ],
  "parallel_tool_calls": false,
  "temperature": 0.0,
  "tool_choice": "auto",
  "tools": [],
  "top_p": null,
  "max_output_tokens": null,
  "previous_response_id": null,
  "reasoning": {},
  "status": "completed",
  "text": {},
  "truncation": null,
  "usage": {
    "input_tokens": 179,
    "input_tokens_details": null,
    "output_tokens": 103,
    "output_tokens_details": null,
    "total_tokens": 282,
    "cost": null
  },
  "user": null,
  "store": null
}

Error raised after tool call output is being provided.

"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_horoscope` , position 2. Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures for more details."

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

1.79.0

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions