ai icon indicating copy to clipboard operation
ai copied to clipboard

Anthropic issue with Gemini thinking responses.

Open JacoboGanon opened this issue 1 year ago • 3 comments

Error:

When I use Gemini Pro 2.5 to answer a request and then use an anthropic model (doesn't matter which one) I am getting the following error: [Error [AI_APICallError]: messages.1.content.0.thinking.signature: Field required]

How to reproduce:

Simple hello message to 2.5 pro, followed by a simple hello message to claude sonnet 4.0

Setup:

  • Using the latest version of Anthropic and Google Generative AI Providers.
  • "ai": "^4.3.16"
  • Specific models used: Google Gemini 2.5 pro - gemini-2.5-pro-preview-05-06, Claude sonnet 4 - claude-sonnet-4-20250514

JacoboGanon avatar Jul 23 '25 01:07 JacoboGanon

May not be a big help but I had an app that communicated with Claude (through AWS Bedrock) and Gemini. When I tried to switch through models, I got errors.

Updating to the AI SDK v5 beta for my providers and core app fixed the problem for me.

rfsmart-eland avatar Jul 23 '25 15:07 rfsmart-eland

Identify issue type

Identified type: Bug
Confidence: High

Rationale: The issue reports a concrete runtime failure in existing AI SDK provider behavior when switching from Gemini thinking responses to Anthropic models.

Evidence:

  • Using Gemini 2.5 Pro followed by an Anthropic model produces AI_APICallError: messages.1.content.0.thinking.signature: Field required.
  • Reporter provides a simple reproduction: hello message to Gemini 2.5 Pro, then hello message to Claude Sonnet 4, with AI SDK ^4.3.16.
  • A commenter reports similar model-switching errors between Claude and Gemini, resolved by updating to AI SDK v5 beta.

lgrammel avatar Jul 02 '26 09:07 lgrammel

Fixed by #5922

n1ckoates avatar Aug 11 '26 15:08 n1ckoates