Python: Bug: Gemini 3 function calling fails with HTTP 400 (missing thoughtSignature support)
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
- Steps to reproduce the behavior:
- Install and use semantic-kernel==1.39.2
- Configure the Google/Gemini connector with Gemini gemini-3-pro-preview
- (thinkingConfig / include_thoughts equivalent)
- Register a tool/kernel function
- Send a prompt that triggers a tool call (or multi-step orchestration that triggers tools)
- Tool executes and SK sends the tool result back to Gemini
- 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
same as https://github.com/microsoft/semantic-kernel/issues/13417