Skip to content

test: add e2e test for Gemini multi-turn tool calls with reasoning#343

Merged
robert-j-y merged 1 commit intomainfrom
robert/gemini-reasoning-multiturn-e2e
Jan 23, 2026
Merged

test: add e2e test for Gemini multi-turn tool calls with reasoning#343
robert-j-y merged 1 commit intomainfrom
robert/gemini-reasoning-multiturn-e2e

Conversation

@robert-j-y
Copy link
Contributor

Description

Add e2e tests to verify that reasoning_details (thought signature) are properly preserved in tool calls when using Gemini models with thinking enabled across multi-turn conversations.

The providerOptions containing reasoning_details must be preserved when passing response.messages from a first request to a second request, otherwise Gemini will reject the continuation. This was fixed in AI SDK v6.0.

Tests both streamText and generateText APIs to ensure the fix works for both.

Closes #314

Checklist

  • I have run pnpm stylecheck and pnpm typecheck
  • I have run pnpm test and all tests pass
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable) - N/A, no documentation changes needed

Changeset

  • I have run pnpm changeset to create a changeset file - N/A, test-only change

@robert-j-y robert-j-y merged commit 111f582 into main Jan 23, 2026
2 checks passed
@robert-j-y robert-j-y deleted the robert/gemini-reasoning-multiturn-e2e branch January 23, 2026 22:26
kesavan-byte pushed a commit to osm-API/ai-sdk-provider that referenced this pull request Feb 13, 2026
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.

Tool calls missing thought signature with Gemini Flash 3

1 participant