fix: preserve message-level thought signatures through inference proxy#5400
Draft
shawnfeldman wants to merge 3 commits intomainfrom
Draft
fix: preserve message-level thought signatures through inference proxy#5400shawnfeldman wants to merge 3 commits intomainfrom
shawnfeldman wants to merge 3 commits intomainfrom
Conversation
…y path ChoiceDelta.extra (containing thought signatures) was parsed from streaming responses but never transferred to ChatMessage.extra when the assistant message was created. This caused Gemini Flash 3 thought signatures to be lost on round-trips through the inference proxy, leading to INVALID_ARGUMENT errors or degraded results on subsequent turns. https://claude.ai/code/session_01FShocegnZrFbYzv6hxx328
|
|
Verify that ChoiceDelta.extra (containing provider-specific metadata like Gemini thought signatures) is correctly propagated to ChatMessage.extra when creating assistant messages. https://claude.ai/code/session_01FShocegnZrFbYzv6hxx328
theomonnom
approved these changes
Apr 9, 2026
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
Message-level thought signatures dropped in inference proxy path
ChoiceDelta.extra(containing Gemini thought signatures) is parsed from streaming responses but never transferred toChatMessage.extrawhen the assistant message is created. This causes Gemini Flash 3 thought signatures to be lost on round-trips through the inference proxy, leading toINVALID_ARGUMENTerrors or degraded results on subsequent turns. Tool-call-level signatures work correctly; only pure text turns are affected.Changes
generation.py: Addedextrafield to_LLMGenerationDataand collectchunk.delta.extraduring streamingagent_activity.py: Pass the collectedextradict when creating the assistantChatMessageTest plan
INVALID_ARGUMENTerrorsSlack thread: https://live-kit.slack.com/archives/C0AG4ANRJ6M/p1775752933657069
https://claude.ai/code/session_01FShocegnZrFbYzv6hxx328