fix: support Google/Vertex thought_signature in multi-turn conversations#809
Merged
fix: support Google/Vertex thought_signature in multi-turn conversations#809
Conversation
The thinking signature was only preserved for Anthropic's namespace, causing Gemini 3 models to fail with "Function call is missing a thought_signature" on the second turn of tool-calling conversations. - Extract signature from google.thoughtSignature and vertex.thoughtSignature - Store signatureProvider to restore the correct namespace on output - Add tests for Google and Vertex signature extraction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
providerMetadata.anthropic.signature), ignoring Google'sgoogle.thoughtSignatureand Vertex'svertex.thoughtSignaturesignatureProviderfield toThinkingPartto track which provider namespace the signature belongs toFiles changed
packages/core/src/schemas/message-part.ts- AddsignatureProviderfield toThinkingPartpackages/runtime/src/helpers/thinking.ts- Extract signatures from all provider namespacespackages/runtime/src/messages/message.ts- Restore signatures to correct namespacepackages/runtime/src/helpers/thinking.test.ts- Add Google/Vertex test casesTest plan
bun run typecheckpasses (24/24)bun run testpassesbun test packages/runtime/src/helpers/thinking.test.tspasses (12/12)bun run validate:changesetpasses🤖 Generated with Claude Code