Skip to content

Prevent required tool requests from stopping during reasoning - #52

Merged
ehartford merged 6 commits into
fix/responses-generation-errorsfrom
fix/required-tool-reasoning-stop
Oct 15, 2026
Merged

ehartford merged 6 commits into
fix/responses-generation-errorsfrom
fix/required-tool-reasoning-stop

Conversation

@ropoctl

@ropoctl ropoctl commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dc67e309-af95-402e-ab8e-a1c4385eda0d
📥 Commits

Reviewing files that changed from the base of the PR and between f4d2103 and a33f57b.

📒 Files selected for processing: 7
  • perf/optimization_status.md
  • tests/entrypoints/test_responses_function_completion.py
  • tests/v1/structured_output/test_required_reasoning_stop.py
  • vllm/entrypoints/openai/responses/serving.py
  • vllm/parser/abstract_parser.py
  • vllm/sampling_params.py
  • vllm/v1/structured_output/__init__.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ropoctl
ropoctl added this pull request to stack #74 September 19, 2026 23:55
Eric Hartford 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.
@ehartford
ehartford merged commit 470a782 into main Oct 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants