fix(anthropic): bypass model_dump on content_block_stop#2953
Merged
chaynabors merged 1 commit intoJun 25, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
c423414 to
3cb6c3a
Compare
3cb6c3a to
599a752
Compare
Contributor
|
/strands review |
Contributor
|
Assessment: Approve Small, focused bugfix that correctly mirrors the established Review Notes
Nicely scoped fix that follows the existing precedent. |
mkmeral
approved these changes
Jun 25, 2026
awsarron
approved these changes
Jun 25, 2026
3 tasks
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.
Anthropic SDK 0.84.0+ types stream events as ParsedMessageStreamEvent, which makes content_block_stop carry a generic ParsedTextBlock that does not match the discriminated union, triggering six Pydantic serialization warnings per invocation. The fix mirrors the existing message_stop workaround from #1746: build the minimal {type, index} dict that format_chunk already consumes instead of round-tripping through model_dump.
Fixes #1865.