Uh oh!
There was an error while loading. Please reload this page.
fix(provider): preserve Bedrock Claude reasoning replay - #23927
fix(provider): preserve Bedrock Claude reasoning replay#23927PershingSquare wants to merge 4 commits into
Conversation
a0a1805 to
3ac1772CompareThanks for updating your PR! It now meets our contributing guidelines. 👍 |
3ac1772 to
62bf497Compare…erleaved-replay # Conflicts: # packages/opencode/src/provider/transform.ts
31830a4 to
02992e9CompareAutomated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#23926
Type of change
What does this PR do?
This fixes a Bedrock Claude replay bug in
packages/opencode/src/provider/transform.ts.OpenCode has an interleaved reasoning rewrite that moves
reasoningparts intoproviderOptions.openaiCompatible. That is correct for OpenAI-compatible providers, but not for Bedrock Claude. For Bedrock Claude/Opus 4.7, those reasoning blocks need to stay in native message content so provider metadata/signatures are preserved on replay.This change limits that rewrite to
@ai-sdk/openai-compatibleand adds a regression test for a Bedrock Opus 4.7 model withinterleavedconfigured.How did you verify your code works?
bun test test/provider/transform.test.tsbun typecheckreasoningblock and does not move it intoproviderOptions.openaiCompatible.reasoning_contentScreenshots / recordings
Not a UI change.
Checklist