Conversation
…se-header timeout Gemini extended-thinking models return a per-tool-call `thought_signature` that must be echoed back on the next request. The CLI was dropping it on the streaming path, causing Google to reject follow-up turns with HTTP 400 "Function call is missing a thought_signature in functionCall parts". Pulls in SDK v1.16.0 (which adds `extra_content.google.thought_signature` on `ChatCompletionMessageToolCall` and the streaming chunk variant) and merges it into the accumulated tool call so it round-trips through ConversationEntry → outbound request. Also propagate `CLIENT_RESPONSE_HEADER_TIMEOUT` from `gateway.timeout` — the gateway's HTTP client otherwise defaults to 10s, which kills slow upstream responses (e.g. image generation) long before `CLIENT_TIMEOUT` would fire.
ig-semantic-release-bot Bot
pushed a commit
that referenced
this pull request
Apr 28, 2026
## [0.105.1](v0.105.0...v0.105.1) (2026-04-28) ### 🐛 Bug Fixes * **google:** Preserve thought_signature on tool calls and bump response-header timeout ([#464](#464)) ([57c9e0a](57c9e0a)) ### 📚 Documentation * Document .infer/plans/ in directory structure ([daf9a75](daf9a75)) ### 🧹 Maintenance * **nix:** Update package to v0.105.0 ([#462](#462)) ([de53e59](de53e59))
Contributor
|
🎉 This PR is included in version 0.105.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extra_content.google.thought_signatureinto accumulated tool calls so it round-trips back to the gateway, fixing Google Gemini extended-thinking models rejecting follow-up turns withHTTP 400: Function call is missing a thought_signature in functionCall parts.CLIENT_RESPONSE_HEADER_TIMEOUTfromgateway.timeoutin both Docker and local-binary spawn paths - the gateway's HTTP client otherwise defaults to 10s and cuts slow upstream responses off beforeCLIENT_TIMEOUTwould fire.preserves_google_thought_signature_across_chunks) for the streaming-chunk merge.Background
Gemini-3-Pro and other extended-thinking Gemini models return a per-tool-call
thought_signatureon each function-call part (Google docs: https://ai.google.dev/gemini-api/docs/thought-signatures). Google requires this opaque value to be echoed back on every subsequent request — otherwise it returns400 INVALID_ARGUMENT.The signature lives at
tool_calls[].extra_content.google.thought_signaturein Google's OpenAI-compatible API. The schema/SDK update (released asinference-gateway/sdk@v1.16.0) introducesChatCompletionMessageToolCall.ExtraContentso the typed unmarshal preserves the field. This PR is the CLI side: capture it from streaming chunks inaccumulateToolCallsand let it ride throughConversationEntry.Message.ToolCallson the next outbound request.The timeout change is independent but discovered during testing - image-generation flows sat 10s+ on the upstream call and the gateway's per-client
ResponseHeaderTimeout(default 10s) was killing them well beforeCLIENT_TIMEOUT(already configured) had any chance to apply.