Repository navigation
Fix tool call reasoning boundary - #6411
Merged
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
sidsingh-nvidia
approved these changes
Aug 11, 2026
shanmugamr1992
approved these changes
Aug 11, 2026
kvareddy
approved these changes
Aug 12, 2026
dimapihtar
requested changes
Aug 13, 2026
dimapihtar
left a comment
Contributor
There was a problem hiding this comment.
Hi, could you add unit tests for newly added logic/function to the tokenizers? Or it will be covered by funcitonal tests?
Contributor
oh sorry, you've already added. Just missed it. LGTM. |
dimapihtar
self-requested a review
August 13, 2026 12:20
dimapihtar
approved these changes
Aug 13, 2026
Signed-off-by: Chaitra Sathe <csathe@nvidia.com>
Signed-off-by: Chaitra Sathe <csathe@nvidia.com>
nvcsathe
force-pushed
the
parser-tool-call-fix
branch
from
August 13, 2026 16:08
2f42c5a to
ca9feee
Compare
nvcsathe
enabled auto-merge
August 13, 2026 16:08
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/31725348823 |
ksivaman
pushed a commit
to ksivaman/Megatron-LM
that referenced
this pull request
Sep 1, 2026
Signed-off-by: Chaitra Sathe <csathe@nvidia.com>
ArEsKay3
added a commit
to ArEsKay3/Megatron-LM
that referenced
this pull request
Sep 14, 2026
NVIDIA#6411 taught the qwen3-coder tool parser to advertise <tool_call> as an implicit end of reasoning, so a tool call emitted before </think> is split out of the reasoning text and parsed. That matches vLLM's combined qwen3 parser engine, but not vLLM's standalone reasoning parsers (deepseek_r1 and its subclasses) paired with the qwen3_coder tool parser, which leave such a tool call inside reasoning_content. Anyone serving the same model on both engines with a separate reasoning parser now gets different tool calls out, and RL rewards that penalise an unparsed <tool_call> see the two engines disagree. Keep qwen3-coder-tool strict (no implicit end), matching the separate- parser pairing, and add qwen3-coder-tool-combined carrying the marker for callers who want the combined-engine behaviour. The choice is made in the parser list, where it is visible in the server config, rather than implied by which tool parser is loaded. Streaming markers are unchanged on both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Robert Kirby <rkirby@nvidia.com>
4 of 6 tasks
sidsingh-nvidia
pushed a commit
to sidsingh-nvidia/Megatron-LM
that referenced
this pull request
Sep 17, 2026
PR NVIDIA#6411 made qwen3-coder-tool declare <tool_call> an implicit end of reasoning, so a tool call emitted before </think> is split out of the reasoning text and parsed. That matches vLLM's combined qwen3 parser but not its standalone reasoning parsers paired with the qwen3_coder tool parser, which leave such a tool call in reasoning_content. Serving the same model on both engines with a separate reasoning parser now yields different tool calls. Keep qwen3-coder-tool strict and add qwen3-coder-tool-combined carrying the marker, so the behaviour is chosen in the parser list. Streaming markers are unchanged on both. Folded into the Qwen3-Coder parser-parity branch alongside the grammar and coercion parity fixes (NVIDIA#7320); relevant to NVIDIA#7313. Signed-off-by: Robert Kirby <rkirby@nvidia.com> (cherry picked from commit c09b3fe) Signed-off-by: Siddharth Singh <sidsingh@nvidia.com>
sidsingh-nvidia
pushed a commit
to sidsingh-nvidia/Megatron-LM
that referenced
this pull request
Sep 18, 2026
PR NVIDIA#6411 made qwen3-coder-tool declare <tool_call> an implicit end of reasoning, so a tool call emitted before </think> is split out of the reasoning text and parsed. That matches vLLM's combined qwen3 parser but not its standalone reasoning parsers paired with the qwen3_coder tool parser, which leave such a tool call in reasoning_content. Serving the same model on both engines with a separate reasoning parser now yields different tool calls. Keep qwen3-coder-tool strict and add qwen3-coder-tool-combined carrying the marker, so the behaviour is chosen in the parser list. Streaming markers are unchanged on both. Folded into the Qwen3-Coder parser-parity branch alongside the grammar and coercion parity fixes (NVIDIA#7320); relevant to NVIDIA#7313. Signed-off-by: Robert Kirby <rkirby@nvidia.com> (cherry picked from commit c09b3fe) Signed-off-by: Siddharth Singh <sidsingh@nvidia.com>
This branch was previously deployed
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.
What does this PR do?
Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.