accepts output_text user blocks in complexity extraction - #5600
Open
kohlivrinda wants to merge 1 commit into
Open
accepts output_text user blocks in complexity extraction#5600kohlivrinda wants to merge 1 commit into
kohlivrinda wants to merge 1 commit into
Conversation
Contributor
📝 WalkthroughWalkthroughResponses complexity extraction now treats ChangesResponses text block classification
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
kohlivrinda
marked this pull request as ready for review
July 28, 2026 06:16
18 tasks
Pratham-Mishra04
approved these changes
Jul 28, 2026
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
The Anthropic→Responses conversion path tags user text blocks as
output_text(rather thaninput_text) when routing through bedrock/-prefixed models via thekeepToolsGroupedpath. Previously,isResponsesInputTextBlockonly accepted empty orinput_texttyped blocks, causing complexity extraction to silently skip these blocks and fall through to the default routing rule — effectively disabling complexity-based routing for Claude Code traffic using a bedrock/ alias.Changes
isResponsesInputTextBlocknow also acceptsoutput_text-typed blocks so that user text arriving via the Anthropic→Responses conversion is correctly treated as plain text during complexity extraction.output_textmust still yield a validLastUserTextandSystemTextfrombuildComplexityInput.Type of change
Affected areas
How to test
go test ./plugins/governance/...The new test
TestBuildComplexityInput_ResponsesOutputTextTypedUserBlocksshould pass, confirming thatoutput_text-typed user blocks are correctly extracted asLastUserTextduring complexity classification.Breaking changes
Related issues
Security considerations
None. This change only affects how content block types are interpreted during complexity routing classification.
Checklist
docs/contributing/README.mdand followed the guidelines