Skip to content

fix(google): auto-inject skip_thought_signature_validator on Gemini 3 replays#15560

Merged
gr2m merged 1 commit into
mainfrom
gr2m/15550-skip-thought-signature-validator-main
May 27, 2026
Merged

fix(google): auto-inject skip_thought_signature_validator on Gemini 3 replays#15560
gr2m merged 1 commit into
mainfrom
gr2m/15550-skip-thought-signature-validator-main

Conversation

@gr2m
Copy link
Copy Markdown
Collaborator

@gr2m gr2m commented May 22, 2026

Background

Gemini 3 rejects replayed assistant functionCall parts without thoughtSignature with HTTP 400. This happens when app/client code persists or rebuilds messages and drops providerOptions.

Summary

  • For Gemini 3 only (/^gemini-3[.-]/), inject Google's documented skip_thought_signature_validator sentinel when a replayed tool call has no signature.
  • Warn once per request with affected tool names.
  • Adapted to main V4 Google provider files and existing google / googleVertex / vertex namespace lookup.

Manual Verification

Live replay against google('gemini-3-flash-preview'): missing-signature replay changed from HTTP 400 to HTTP 200 with warning.

Checklist

  • All commits are signed (PRs with unsigned commits cannot be merged)
  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Related Issues

Closes #15550.
Refs #10344, #11413, #14196, #15548, #13060.

… replays

Co-authored-by: Cursor <cursoragent@cursor.com>
@gr2m gr2m merged commit a8d70b6 into main May 27, 2026
49 checks passed
@gr2m gr2m deleted the gr2m/15550-skip-thought-signature-validator-main branch May 27, 2026 15:07
@github-actions
Copy link
Copy Markdown
Contributor

🚀 Published in:

Package Version
ai 7.0.0-canary.155 github npm
@ai-sdk/amazon-bedrock 5.0.0-canary.71 github npm
@ai-sdk/angular 3.0.0-canary.155 github npm
@ai-sdk/google 4.0.0-canary.74 github npm
@ai-sdk/google-vertex 5.0.0-canary.96 github npm
@ai-sdk/langchain 3.0.0-canary.155 github npm
@ai-sdk/llamaindex 3.0.0-canary.155 github npm
@ai-sdk/otel 1.0.0-canary.101 github npm
@ai-sdk/react 4.0.0-canary.157 github npm
@ai-sdk/rsc 3.0.0-canary.156 github npm
@ai-sdk/svelte 5.0.0-canary.155 github npm
@ai-sdk/vue 4.0.0-canary.155 github npm
@ai-sdk/workflow 1.0.0-canary.72 github npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(provider/google): auto-inject skip_thought_signature_validator for Gemini 3 tool-call replays without a signature

1 participant