fix(bedrock): tolerate omitted reasoning blocks#182
Merged
raphael merged 3 commits intoJul 20, 2026
Conversation
…hinking Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # features/model/bedrock/stream.go # features/model/bedrock/stream_usage_test.go
Member
|
Reviewed the final diff and provider contract. Signature-only reasoning is preserved for verbatim replay, while unsigned plaintext still fails at the Bedrock boundary. No blocking code findings. Verified the PR head with:
|
raphael
approved these changes
Jul 20, 2026
raphael
left a comment
Member
There was a problem hiding this comment.
Signature-only reasoning now matches the provider replay contract, unsigned plaintext remains rejected, and the Bedrock package tests pass.
raphael
enabled auto-merge (squash)
July 20, 2026 20:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
thinking.display: "omitted".Rationale
Anthropic documents
thinking.display: "omitted"as returning reasoning blocks with empty text and a signature; this is the default for newer Claude models. Bedrock Converse passes this through.The adapter previously treated these valid signature-only blocks as malformed. Signature-only reasoning is a complete replay artifact: the signature carries the encrypted reasoning state and must be passed back unchanged for multi-turn continuity. Unsigned plaintext remains unreplayable and is rejected at the provider boundary.
Test plan
go test ./features/model/bedrock