Skip to content

docs(inference): clarify Lightning reasoning field and max_tokens - #8894

Merged
cv merged 1 commit into
mainfrom
fix/lightning-reasoning-docs-8878
Aug 12, 2026
Merged

cv merged 1 commit into
mainfrom
fix/lightning-reasoning-docs-8878

Conversation

@yanyunl1991

@yanyunl1991 yanyunl1991 commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Direct callers of the managed Nemotron 3.5 Lightning vLLM endpoint see an empty reasoning_content and, with a modest max_tokens, an empty content. Investigation shows neither is a NemoClaw defect: the pinned vLLM runtime renamed the deprecated reasoning_content field to reasoning, and the model's heavy reasoning trace counts against max_tokens. This PR documents both behaviors on the Lightning profile section.

Closes #8878.

Reproduction

On a DGX Spark, onboarded the Lightning profile and queried its managed vLLM directly.

Environment

  • Test machine: our DGX Spark aarch64 test host (GB10 GPU)
  • NemoClaw main HEAD ba0fbfca0; managed profile vllm.dgx-spark-gb10.single.nemotron-3.5-lightning-30b-a3b-nvfp4; vLLM 0.23.1rc1.dev1327

Observed (reproduces the report)

r-count   mt=256  -> finish=length ctok=256  content_len=0   reasoning_content=null
r-count   mt=512  -> finish=length ctok=512  content_len=0   reasoning_content=null
r-count   mt=1024 -> finish=stop   ctok=798  content_len=363 reasoning_content=null
two-train mt=1024 -> finish=length ctok=1024 content_len=0   reasoning_content=null

Root of the two symptoms (also observed on the same host)

message keys: ['role','content','refusal','annotations','audio','function_call','reasoning']
message.reasoning        -> str, 1892 chars (the full reasoning trace)
message.reasoning_content -> absent / null

The reasoning is present in reasoning; the empty content at low budgets is the reasoning trace consuming max_tokens before the answer.

Analysis

Two reported symptoms, neither a NemoClaw serving-recipe defect:

  1. reasoning_content is null. vLLM 0.23.x intentionally renamed the response field. From the pinned runtime's vllm/entrypoints/openai/chat_completion/protocol.py:

    # Renames the deprecated `reasoning_content` field to `reasoning`
    reasoning_content = msg.pop("reasoning_content", None)
    if reasoning_content is not None and msg.get("reasoning") is None:
        msg["reasoning"] = reasoning_content

    The step3p5 reasoning parser populates message.reasoning. The reasoning is not discarded; clients reading the old reasoning_content field see null. The recipe's --reasoning-parser step3p5 is the correct model-specific parser (mirrors qwen3/muse_glimmer for the other Spark reasoning profiles); recipe arguments control the parser, not the response field name, so this is not a recipe-config issue.

  2. Empty content with finish_reason=length at low max_tokens. The reasoning trace counts against max_tokens. A budget of 256–512 (and 1024 for hard prompts) is consumed entirely by reasoning before the answer begins. The OpenClaw agent path is unaffected because it already requests a large budget.

Because the config is correct and the reasoning is fully available, the actionable NemoClaw change is documentation (also what the issue proposes): read reasoning from reasoning, and size max_tokens for this reasoning-heavy profile.

Fix

Adds a <Note> to the Nemotron 3.5 Lightning profile section of docs/inference/set-up-vllm.mdx:

  • Read reasoning from choices[].message.reasoning (and delta.reasoning when streaming), not reasoning_content, which the pinned vLLM runtime renamed.
  • Send a generous max_tokens (at least 1024, more for hard prompts); a modest budget can be spent entirely on reasoning and return empty content with finish_reason=length.

Changes

  • docs/inference/set-up-vllm.mdx: Lightning profile Note on the reasoning field and max_tokens sizing for direct callers.

Type of Change

  • Doc only (prose changes, no code sample modifications)

Verification

  • npx prek run passes on the changed file
  • Claims verified against the live managed Lightning profile on a real DGX Spark (reasoning in reasoning; small budgets return empty content with finish_reason=length)
  • No secrets, API keys, or credentials committed
  • Docs updated for the user-facing behavior

AI Disclosure

  • AI-assisted — tool: Claude Code

Signed-off-by: Yanyun Liao yanyunl@nvidia.com

Summary by CodeRabbit

  • Documentation
    • Added guidance for calling the Nemotron 3.5 Lightning endpoint directly.
    • Clarified that reasoning output is available through the current reasoning and delta.reasoning fields.
    • Recommended setting max_tokens to at least 1024 to ensure responses include answer content.

The managed Nemotron 3.5 Lightning vLLM profile serves a reasoning model,
and direct callers of its endpoint hit two surprises. The pinned vLLM
runtime (v0.23.x) renamed the deprecated `reasoning_content` response field
to `reasoning`, so `choices[].message.reasoning_content` is null even though
the model reasoned — the reasoning is not discarded, it is in `reasoning`.
And because the reasoning trace counts against `max_tokens`, a modest budget
can be consumed entirely by reasoning, returning an empty `content` with
`finish_reason=length`. The OpenClaw agent path is unaffected because it
already requests a large budget.

Document both behaviors on the Lightning profile section so direct callers
read reasoning from `reasoning` and size `max_tokens` (at least 1024)
appropriately. Verified against the live managed profile on a DGX Spark: the
`reasoning` field carried the full trace while `reasoning_content` was null,
and small budgets returned empty content with finish_reason=length.

Fixes #8878

Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 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: 9e31332b-deab-475d-93d5-ee68ce198076

📥 Commits

Reviewing files that changed from the base of the PR and between ac6adac and 9e9faa2.

📒 Files selected for processing (1)
  • docs/inference/set-up-vllm.mdx

📝 Walkthrough

Walkthrough

The vLLM setup guide now documents that Nemotron 3.5 Lightning reasoning appears in reasoning fields and recommends at least 1024 max_tokens for direct callers. It also states that the OpenClaw agent path is unaffected.

Changes

Nemotron Lightning caller guidance

Layer / File(s) Summary
Direct caller response and token guidance
docs/inference/set-up-vllm.mdx
The guide documents reasoning and delta.reasoning, recommends at least 1024 max_tokens, explains possible finish_reason=length responses, and identifies the OpenClaw exception.

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

Possibly related PRs

  • NVIDIA/NemoClaw#8813: Updates the same vLLM setup documentation for Nemotron 3.5 Lightning with distinct profile validation guidance.

Suggested labels: v0.0.107

Suggested reviewers: senthilr-nv

🚥 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 documentation changes for the Lightning reasoning field and max_tokens guidance.
Linked Issues check ✅ Passed The documentation addresses issue #8878 by documenting reasoning fields and recommending at least 1024 max_tokens for direct callers.
Out of Scope Changes check ✅ Passed The pull request contains only documentation changes directly related to issue #8878 and the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/lightning-reasoning-docs-8878

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · medium confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized terminology decisions differ; normalized E2E selections differ; severity counts match.
2 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • reasoning_content at docs/inference/set-up-vllm.mdx:296: selected only by the second-opinion lane as established.
  • reasoning at docs/inference/set-up-vllm.mdx:296: selected only by the second-opinion lane as define.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • define — direct callers at docs/inference/set-up-vllm.mdx:294: Define direct callers at first use as clients that call the managed vLLM endpoint directly.
  • define — reasoning trace at docs/inference/set-up-vllm.mdx:293: Define reasoning trace at first use as model-generated reasoning output.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: None

1 optional E2E recommendation
  • gpu-e2e

Workflow run details

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

@yanyunl1991 yanyunl1991 added area: docs Documentation, examples, guides, or docs build area: inference Inference routing, serving, model selection, or outputs platform: dgx-spark Affects DGX Spark hardware or workflows v0.0.108 labels Aug 12, 2026
@apurvvkumaria apurvvkumaria self-assigned this Aug 12, 2026
@cv
cv merged commit 62d2f4c into main Aug 12, 2026
60 of 61 checks passed
@cv
cv deleted the fix/lightning-reasoning-docs-8878 branch August 12, 2026 16:18
@wscurran wscurran added area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior chore Build, CI, dependency, or tooling maintenance provider: vllm vLLM local or hosted provider behavior labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation, examples, guides, or docs build area: inference Inference routing, serving, model selection, or outputs area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior chore Build, CI, dependency, or tooling maintenance platform: dgx-spark Affects DGX Spark hardware or workflows provider: vllm vLLM local or hosted provider behavior

Projects

None yet

4 participants