Skip to content

Python: Bug: Gemini 3 function calling fails with HTTP 400 (missing thoughtSignature support) #13480

@dariusFTOS

Description

@dariusFTOS

Describe the bug
When using Semantic Kernel Python with Gemini 3 Pro (preview) and thinking enabled, tool/function calling fails with HTTP 400 because the follow-up request does not include the required thought_signature in functionCall parts.

Observed error (from logs):
400 Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly...
Additional data, function call default_api:doc_analyzer_tools-get_documents_by_type, position 2.
Please refer to https://ai.google.dev/gemini-api/docs/thought-signatures

This suggests the Python Gemini connector is not preserving and resending thoughtSignature values returned by the Gemini API when thinking is enabled, which breaks subsequent turns that include tool results.

To Reproduce

  1. Steps to reproduce the behavior:
  2. Install and use semantic-kernel==1.39.2
  3. Configure the Google/Gemini connector with Gemini gemini-3-pro-preview
  4. (thinkingConfig / include_thoughts equivalent)
  5. Register a tool/kernel function
  6. Send a prompt that triggers a tool call (or multi-step orchestration that triggers tools)
  7. Tool executes and SK sends the tool result back to Gemini
  8. See error: HTTP 400 “Function call is missing a thought_signature in functionCall parts” (often referencing a specific function call and a position index)

Expected behavior
Tool/function calling should succeed when thinking is enabled. The connector should:
Capture the thoughtSignature returned by Gemini responses (when thinking is enabled)
Persist it in the conversation state
Include the thought_signature in subsequent turns (especially when sending tool results back), per Gemini Thought Signatures requirements
Screenshots
If applicable, add screenshots to help explain your problem.

Platform
Language: Python
Source: pip package semantic-kernel==1.39.2
AI model: Google Gemini gemini-3-pro-preview
IDE: VS Code (also reproducible in containers/CI)
OS: Linux (Docker), also expected on Windows/macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpythonPull requests for the Python Semantic Kerneltriage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions