Skip to content

reproduction: could not reproduce @ai-sdk/open-responses: reasoning items are never replayed in assistant - #18512

Closed
ai-sdk-factory[bot] wants to merge 1 commit into
mainfrom
bug-reproduction-18511-20260806094815729335
Closed

ai-sdk-factory[bot] wants to merge 1 commit into
mainfrom
bug-reproduction-18511-20260806094815729335

Conversation

@ai-sdk-factory

@ai-sdk-factory ai-sdk-factory Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Bug

@ai-sdk/open-responses: reasoning items are never replayed in assistant messages, breaking tool loops on providers that require them

Reproduction

  • The runnable artifact at examples/ai-functions/src/reproduction/open-responses-deepseek-reasoning-replay.ts exercises the reported two-step tool loop using @ai-sdk/open-responses 2.0.23, deepseek-v4-flash, and https://api.deepseek.com/v1/responses.
  • The expected round-two HTTP 400 did not occur; DeepSeek returned HTTP 200 and the AI SDK completed the tool loop with the final date response.
  • The captured round-two request omitted the reasoning item, confirming the secondary serialization gap in packages/open-responses/src/responses/convert-to-open-responses-input.ts.
  • The round-two request retained DeepSeek's provider-issued tool call ID; DeepSeek accepted that request despite the missing reasoning item.
  • A direct narrowing check with an unassociated synthetic call ID returned HTTP 400 when reasoning was omitted and HTTP 200 when one reasoning character was supplied, but that failure did not occur in the actual AI SDK tool loop.

Relevant Documentation

Related Issues

Could not reproduce #18511

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant