Repository navigation
Prevent required tool requests from stopping during reasoning - #52
Merged
ehartford merged 6 commits intoOct 15, 2026
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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 |
ropoctl
added this pull request to stack #74
September 19, 2026 23:55
added 5 commits
October 14, 2026 18:15
… into pr52-fix # Conflicts: # tests/entrypoints/test_responses_function_completion.py
The stop-token mask for required-tool reasoning rows also set apply_rows for those rows. That flag is not what makes the worker mask a row: V1 apply_grammar_bitmask and V2 apply_grammar_bitmask_rows apply every row of every structured request, so clearing the stop bits already blocks a stop during reasoning. apply_rows is read only by the V2 spec-decode draft-grammar mirror (_mask_rows_by_request / advance_verified), as the authoritative record of which sampled tokens the grammar constrained. Flagging reasoning rows fed reasoning tokens into the tool grammar, which rejects them and disables grammar-aware drafting for the request. Leave apply_rows False for these rows. The tests now assert the flag stays clear while the stop bits are cleared, and drive the scheduler's mask through advance_verified to show the mirror receives no reasoning tokens.
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.
Mask stop IDs until the required tool grammar activates, including speculative and parallel rows; propagate required/named/allowed-tools policy and fail Responses that omit the required call.
Validation: 12 required-tool mask/metadata tests and 47 Responses completion/error tests passed on CPU.
Stack base: #51. This PR contains one new commit.
Combined current-main check: all 26 prepared code/tooling branches applied together; 295 tests passed, eight XPU tests skipped, and 22 proxy/auditor fixtures passed. Hardware/model qualification remains as stated above.