Skip to content

Support Gemini thought_signature from extra_content in tool calls (generic-chat-completion-api) #574

@agamble-quora

Description

@agamble-quora

This request is to support thinking Gemini models (e.g. Gemini-3-Pro) using tools over chat completions endpoint and generic-chat-completion-api provider.

thought_signature is required for tool calls: https://ai.google.dev/gemini-api/docs/thought-signatures#openai

e.g:

{
      "role": "model",
        "tool_calls": [
          {
            "extra_content": {
              "google": {
                "thought_signature": "<Signature A>"
              }
            },
            "function": {
              "arguments": "{\"flight\":\"AA100\"}",
              "name": "check_flight"
            },
            "id": "function-call-1",
            "type": "function"
          }
        ]
    }

The generic-chat-completion-api provider needs to be updated to retain the extra_content field to be passed back to the model with the tool call result.

Thanks!

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