Skip to content

fix(inference): serve managed Nemotron-3-Nano with its reasoning parser (#6915) - #6992

Merged
cv merged 1 commit into
mainfrom
fix/6915-nano-reasoning-parser
Jul 16, 2026
Merged

cv merged 1 commit into
mainfrom
fix/6915-nano-reasoning-parser

Conversation

@yanyunl1991

@yanyunl1991 yanyunl1991 commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

nvidia/NVIDIA-Nemotron-3-Nano-4B-FP8 — the generic-Linux managed-vLLM default — is a reasoning model (its model card describes it as "a unified model for both reasoning and non-reasoning tasks" that "generates a reasoning trace and then a final response"). Its profile in vllm-models.ts pinned the tool-call parser but not a reasoning parser.

Without a reasoning parser, vLLM leaves the <think>…</think> trace inline in content. Because the chat template consumes the opening <think> as the generation prompt prefix, the model output begins mid-trace and contains a bare, orphan </think> marker. OpenClaw's streaming parser mishandles that orphan marker into an empty assistant turn, and the session then wedges until reset (#6915).

Fix

Add --reasoning-parser nemotron_v3 to the Nano-4B profile — the same parser the model card's vLLM launch recipe pins, and the same one the Ultra-550B managed profile already uses. nemotron_v3 is a built-in parser in the pinned NGC vLLM image (it subclasses the DeepSeek-R1 parser), so no plugin file is required; it moves the reasoning trace out of content.

Verification (real hardware — DGX Spark GB10)

Served the checkpoint with the profile's exact generated serve command, sending an identical reasoning request to each:

Serve args content returned to the agent
current profile (no reasoning parser) "…Provide brief thought then answer.\n</think>\nThe train covers 60 km… **80 km/h**." — reasoning trace and orphan </think> inline → wedge trigger
profile + --reasoning-parser nemotron_v3 "\nThe train covers 60 km… **80 km/h**." — clean final answer, no </think>

The reasoning parser is the only variable changed between the two runs. Unit test in vllm-models.test.ts asserts the generated Nano serve command now includes --reasoning-parser nemotron_v3 (exactly once, paired with its value).

Scope

Nano is the generic-Linux managed-vLLM default (platforms: ["spark", "station", "linux"]); the fix applies wherever that default resolves. The Spark and Station reasoning defaults already pin their own reasoning parser, so they are unaffected.

Fixes #6915.

Signed-off-by: Yanyun Liao [email protected]

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added built-in reasoning support for the NVIDIA Nemotron 3 Nano 4B model.
    • Improved handling of reasoning traces when serving this model.
  • Tests

    • Expanded coverage to verify the model’s reasoning and tool-calling configuration is applied correctly.

…er (#6915)

Nemotron-3-Nano-4B-FP8 is a reasoning model that emits a <think>...</think>
trace, but the generic-Linux managed-vLLM profile served it without a
reasoning parser. vLLM then left the trace inline in `content` -- including
the bare </think> marker the chat template does not pair with an opening
<think> tag -- and OpenClaw's streaming parser mishandles that orphan marker
into an empty turn that wedges the session until reset.

Add `--reasoning-parser nemotron_v3` to the Nano profile, matching the model
card's vLLM launch recipe and the Ultra-550B managed profile, which already
pins the same parser. `nemotron_v3` is a built-in parser in the pinned NGC
vLLM image (it subclasses the DeepSeek-R1 parser), so no plugin file is
required.

Verified on a DGX Spark GB10 by serving the checkpoint with the profile's
exact generated command: without the flag `content` carried the reasoning
trace and an orphan `</think>`; with it `content` is the clean final answer.

Signed-off-by: Yanyun Liao <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 179dbb73-6d67-4dc9-9d76-482b52e21c21

📥 Commits

Reviewing files that changed from the base of the PR and between 3bc9620 and 42f6a91.

📒 Files selected for processing (2)
  • src/lib/inference/vllm-models.test.ts
  • src/lib/inference/vllm-models.ts

📝 Walkthrough

Walkthrough

The Nemotron-3 Nano-4B vLLM registry entry now configures the nemotron_v3 reasoning parser. Its serve-command test verifies the parser and related tool-calling flags appear exactly once.

Changes

Nemotron reasoning parser

Layer / File(s) Summary
Registry flag and command validation
src/lib/inference/vllm-models.ts, src/lib/inference/vllm-models.test.ts
The Nemotron-3 Nano-4B configuration adds --reasoning-parser nemotron_v3; tests validate this flag and ensure the related tool-calling flags occur exactly once.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#6883: Updates related Nemotron vLLM registry and command expectations for the nemotron_v3 reasoning parser.

Suggested labels: area: inference

Suggested reviewers: zyang-dev, laitingsheng, ericksoa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: enabling the reasoning parser for the managed Nemotron-3-Nano vLLM profile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/6915-nano-reasoning-parser

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

@github-code-quality

github-code-quality Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the fix/6915-nano-reason... branch remains at 80%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main 3bc9620 fix/6915-nano-reason... 42f6a91 +/-
src/lib/securit...ntial-filter.ts 99% 98% -1%
src/lib/state/m...-acquisition.ts 89% 90% +1%
src/lib/inferen.../vllm-models.ts 82% 86% +4%

Updated July 16, 2026 04:17 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / medium confidence
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions
Status: Canonical ledger: 0 blocker(s), 1 warning(s), 0 suggestion(s).

Model lanes

  • GPT-5.6 Terra (primary): Completed · medium confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: inference-routing, network-policy

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Cover the managed Nano reasoning-parser behavior through the sandbox route

  • Location: src/lib/inference/vllm-models.test.ts:233
  • Category: tests
  • Problem: The changed test only inspects the generated `vllm serve` string. It does not show that the managed Nano runtime accepts `nemotron_v3`, returns usable agent content through the advertised sandbox inference route, or remains usable across sequential turns—the observable regression behavior this configuration is intended to address.
  • Impact: A parser name that is unavailable, rejected, or ineffective in the pinned managed runtime can leave managed Nano startup or agent conversations broken while the registry unit test still passes.
  • Recommendation: Add a focused case to the existing inference-routing coverage that serves the managed Nano profile, sends an agent-compatible request through the sandbox route, and verifies a usable response; include sequential requests in one session to detect a later-turn wedge.
  • Verification: Inspect the existing inference-routing E2E test and its helpers for a managed-vLLM Nano launch plus a sandbox-routed, multi-turn OpenClaw request assertion; current static coverage at this line only asserts command text.
  • Test coverage: An existing inference-routing E2E case (or focused addition) that launches `nemotron-3-nano-4b` with the managed recipe, performs sequential agent turns through the advertised sandbox route, and asserts each response is usable without inline/orphan reasoning markers or a wedged later turn.
  • Evidence: `src/lib/inference/vllm-models.test.ts:233-252` checks only the command string contains one `--reasoning-parser nemotron_v3`. The deterministic risk plan requires inference provider route reachability and real-request behavior for `src/lib/inference/vllm-models.ts`. The checked-in E2E inventory has inference-routing and network-policy suites but no discovered Nano reasoning-parser runtime coverage.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@cv
cv merged commit 1b7248b into main Jul 16, 2026
83 of 84 checks passed
@cv
cv deleted the fix/6915-nano-reasoning-parser branch July 16, 2026 08:11
@cjagwani cjagwani mentioned this pull request Jul 17, 2026
10 of 21 tasks
cv pushed a commit that referenced this pull request Jul 17, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical dated changelog entry required before the v0.0.85
release plan can be generated.
The entry summarizes the user-visible OpenShell, DGX Station, inference,
MCP, onboarding, and recovery changes merged since v0.0.84 and links to
their owning guides.

## Changes

- Add `docs/changelog/2026-07-16.mdx` with the exact `## v0.0.85`
heading, parser-safe SPDX comment, release summary, and detailed
bullets.
- Link every documented theme to its most specific published OpenClaw
guide routes.
- Reconcile the release entry with these merged source PRs:
- #6726 -> `docs/changelog/2026-07-16.mdx`: Document the supported
OpenShell v0.0.85 upgrade, immutable consumed artifacts, multiline exec,
credential rewrite diagnostics, and child-process TLS boundary.
- #6986 -> `docs/changelog/2026-07-16.mdx`: Document managed MCP
behavior shared across supported agents.
- #6991 and #7045 -> `docs/changelog/2026-07-16.mdx`: Document qualified
DGX Station host preparation and the interactive-terminal boundary for
`--station-deepseek`.
- #6992, #7001, #7006, and #7044 -> `docs/changelog/2026-07-16.mdx`:
Document managed-model reasoning behavior, safe inference route
mutation, and verified vLLM served aliases.
- #6865, #7010, and #7028 -> `docs/changelog/2026-07-16.mdx`: Document
onboarding DNS recovery, explicit notice acceptance, and upgrades with
user-local OpenShell.
- #7005, #7021, #7029, and #7049 -> `docs/changelog/2026-07-16.mdx`:
Document rebuild backup safety, no-dashboard state, managed gateway
discovery, and Hermes shields topology checks.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates the canonical heading,
parser-safe SPDX comment, and detailed entry structure; the docs build
validates published routes.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` passed 6/6.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not applicable to this doc-only entry.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — passed
with 0 errors and 2 pre-existing Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [x] New doc pages include SPDX header and frontmatter (new pages only)
— native changelog entries use the required parser-safe MDX SPDX comment
instead of frontmatter.

---
Signed-off-by: Charan Jagwani <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Added release notes for NemoClaw v0.0.85.
* Documented improvements to compatibility, credential handling, setup
validation, recovery workflows, endpoint configuration, gateway
discovery, and runtime validation.
  * Added links to relevant user-guide sections.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Charan Jagwani <[email protected]>
@wscurran wscurran added area: inference Inference routing, serving, model selection, or outputs area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior provider: vllm vLLM local or hosted provider behavior labels Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: inference Inference routing, serving, model selection, or outputs area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior provider: vllm vLLM local or hosted provider behavior

Projects

None yet

3 participants