feat(inference): add a non-interactive reasoning-effort input for compatible endpoints - #7711
Conversation
…patible endpoints NemoClaw exposed reasoning as a boolean only, so an automation client that requires an explicit reasoning-effort value could not express it through the public CLI. Add NEMOCLAW_REASONING_EFFORT and an --reasoning-effort flag on both inference set grammars, accepting low, medium, high, and default for the unset state, with the flag taking precedence over the variable. The value follows the same lifecycle rails as the reasoning flag through selection, session, registry, resume, rebuild, and recreation, and reaches the endpoint as reasoning_effort in the request body of a model routed through openai-completions. A resumed onboard keeps the recorded value and reports the request it ignores. Unsupported values fail before any provider, policy, sandbox, or registry effect. Resolves #7659 Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…hat records it inference set patched params.extra_body.reasoning_effort for any openai-completions route, but the registry row only keeps the value for compatible-endpoint, so the next rebuild silently dropped it. Restrict the patch to that provider, and correct the documentation on provider scope, flag precedence, and the agent surfaces the setting reaches. Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…re they fail The variable accepts `default` for the unset state exactly as the flag does; a previous edit wrongly said otherwise. Validation also fails only on the compatible-endpoint provider, because every other provider clears the variable without reading it. State both, and drop a duplicated sentence. Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…g provider Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughAdds ChangesReasoning-effort configuration
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit b75d244 in the TypeScript / code-coverage/cliThe overall coverage in commit b75d244 in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-7711.docs.buildwithfern.com/nemoclaw |
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 3 optional E2E recommendations
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (3)
src/lib/onboard/reasoning-effort.test.ts (1)
58-60: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover
defaultthrough the environment input.This only verifies
--reasoning-effort default; add the equivalentNEMOCLAW_REASONING_EFFORT=defaultassertion to protect the documented env contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/onboard/reasoning-effort.test.ts` around lines 58 - 60, Add an environment-input test alongside the existing resolveReasoningEffortRequest coverage, setting NEMOCLAW_REASONING_EFFORT to "default" and asserting it resolves to { effort: null, explicit: true }. Use the test’s existing environment setup and cleanup helpers so the documented env contract is verified without affecting other tests.Source: Path instructions
src/lib/onboard/sandbox-registration.test.ts (1)
397-457: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winExercise non-default session-to-registry propagation.
All new expectations use
null, so this still passes ifselection()drops a recorded"high"value. Add a matching-session case with"high"and assert the returned registry selection preserves it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/onboard/sandbox-registration.test.ts` around lines 397 - 457, The selection tests do not verify propagation of a non-default reasoning-effort value. Add a matching-session case in the selection tests around selection() using compatibleEndpointReasoningEffort set to "high", and assert the returned registry selection preserves "high" while retaining the existing matching metadata behavior.Source: Path instructions
docs/reference/commands.mdx (1)
3141-3181: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
--reasoning-effortappears in the shared Hermes/OpenClaw synopsis but is only documented for OpenClaw.Line 3142's
$$nemoclaw inference setusage synopsis is inside the<AgentOnly variant="openclaw,hermes">block (opened at line 3125), so it renders on both pages, but the entire--reasoning-effortexplanation at lines 3175-3179 is scoped to<AgentOnly variant="openclaw">only. SinceNEMOCLAW_REASONING_EFFORT/--reasoning-effortis explicitly "OpenClaw only" perdocs/inference/set-up-openai-compatible-endpoint.mdxanddocs/inference/configure-model-capabilities.mdx, a Hermes reader sees the flag in the command signature with no explanation of what it does or that it's unsupported for their agent.📝 Proposed fix: scope the flag to the OpenClaw-only synopsis
```bash -$$nemoclaw inference set --provider <provider> --model <model> [--sandbox <name>] [--no-verify] [--endpoint-url <url>] [--credential-env <ENV>] [--inference-api <api>] [--reasoning-effort <effort>] +$$nemoclaw inference set --provider <provider> --model <model> [--sandbox <name>] [--no-verify] [--endpoint-url <url>] [--credential-env <ENV>] [--inference-api <api>]And add an OpenClaw-only synopsis variant near the existing `<AgentOnly variant="openclaw">` block (lines 3173-3181) that shows the flag alongside its explanation. </details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/reference/commands.mdxaround lines 3141 - 3181, Remove
--reasoning-effort from the shared inference set synopsis in the Hermes/OpenClaw
section. Add an OpenClaw-only synopsis that includes --reasoning-effort
immediately before the existing OpenClaw-specific explanation, so Hermes
documentation does not advertise the unsupported flag.</details> <!-- cr-comment:v1:0eb0004c4894f4be2f05142a --> _Source: Path instructions_ </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Inline comments:
In@scripts/nemoclaw-start.sh:
- Around line 1150-1158: Update the reasoning-effort override flow to accept
"default" as an explicit unset value and remove the field when selected. Apply
the provider API override before mutating the model, then determine whether to
add or remove reasoning_effort using that final effective API rather than the
pre-override API. Preserve validation for unsupported values.In
@src/lib/actions/inference-set.ts:
- Line 700: Scope reasoning effort to compatible-endpoint providers across all
paths: in src/lib/actions/inference-set.ts lines 700-700, reject non-null
explicit effort unless the selected provider is compatible-endpoint before route
mutation; in lines 433-450, remove inherited reasoning_effort when the target
provider or API cannot support it while preserving other extra_body values; in
lines 983-985, persist null for unsupported providers; in
scripts/generate-openclaw-config.mts lines 648-654, require both the
compatible-endpoint provider binding and openai-completions; update
src/lib/actions/inference-set-reasoning-effort.test.ts lines 114-144 to seed
existing effort, switch to an unsupported provider/API, and assert it is
rejected or removed.In
@src/lib/actions/sandbox/rebuild-env-isolation.test.ts:
- Around line 51-54: Update the isolation behavior test fixture to assign a
non-empty value to NEMOCLAW_REASONING_EFFORT, then assert the value is absent
during isolation and restored afterward. Keep the existing contract assertion
and test behavior for the other environment variables unchanged.In
@src/lib/actions/sandbox/rebuild-resume-config.ts:
- Around line 118-120: Update the compatibleEndpointReasoningEffort assignment
in the resume-config rebuild flow so an explicitly null
registrySelection.compatibleEndpointReasoningEffort remains authoritative and
does not fall back to legacySelection. Preserve legacy fallback only when the
registry value is absent, and add a regression test covering registry null with
legacy "low" if tests are present for this flow.In
@src/lib/onboard/machine/handlers/provider-inference.ts:
- Around line 514-518: Update the describeIgnoredReasoningEffortEnv call in
handleProviderInferenceState to pass the handler’s injected env argument,
ensuring reasoning-effort resume reads NEMOCLAW_REASONING_EFFORT from the
supplied environment rather than global process.env.In
@src/lib/onboard/reasoning-effort.test.ts:
- Around line 16-19: Remove the direct process.env deletion from the afterEach
cleanup in the reasoning-effort tests. Keep vi.unstubAllEnvs() as the sole
restoration step so the original REASONING_EFFORT_ENV value remains intact.In
@src/lib/state/onboard-session.ts:
- Line 747: Enforce the reasoning-effort enum at both persisted-state boundaries
in src/lib/state/onboard-session.ts: around lines 747-747, validate
compatibleEndpointReasoningEffort during durable-state loading and reject
non-null values other than low, medium, or high; around lines 1273-1277, reject
non-null updates outside the same enum before persisting. Preserve null handling
and prevent invalid values from reaching resumed flows or storage.In
@test/generate-openclaw-config-reasoning-effort.test.ts:
- Around line 119-124: Update the NEMOCLAW_REASONING_EFFORT validation exercised
by runConfigScript to accept default as a valid value and clear the
reasoning-effort override for it, while retaining the existing low, medium, and
high behavior and rejecting unsupported values such as extreme.
Nitpick comments:
In@docs/reference/commands.mdx:
- Around line 3141-3181: Remove --reasoning-effort from the shared inference set
synopsis in the Hermes/OpenClaw section. Add an OpenClaw-only synopsis that
includes --reasoning-effort immediately before the existing OpenClaw-specific
explanation, so Hermes documentation does not advertise the unsupported flag.In
@src/lib/onboard/reasoning-effort.test.ts:
- Around line 58-60: Add an environment-input test alongside the existing
resolveReasoningEffortRequest coverage, setting NEMOCLAW_REASONING_EFFORT to
"default" and asserting it resolves to { effort: null, explicit: true }. Use the
test’s existing environment setup and cleanup helpers so the documented env
contract is verified without affecting other tests.In
@src/lib/onboard/sandbox-registration.test.ts:
- Around line 397-457: The selection tests do not verify propagation of a
non-default reasoning-effort value. Add a matching-session case in the selection
tests around selection() using compatibleEndpointReasoningEffort set to "high",
and assert the returned registry selection preserves "high" while retaining the
existing matching metadata behavior.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Enterprise **Run ID**: `0fccd8a4-ae1a-4a42-a67c-cd66c105a64a` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 8a0f36f612cd8c58e53c22fd6e52d10193ee593d and 999b756540da8c502ff5063a1037d52131acd8ac. </details> <details> <summary>📒 Files selected for processing (59)</summary> * `Dockerfile` * `docs/inference/configure-model-capabilities.mdx` * `docs/inference/set-up-openai-compatible-endpoint.mdx` * `docs/reference/commands.mdx` * `scripts/generate-openclaw-config.mts` * `scripts/nemoclaw-start.sh` * `src/commands/inference/set.ts` * `src/commands/sandbox/inference/set.ts` * `src/lib/actions/inference-set-reasoning-effort.test.ts` * `src/lib/actions/inference-set.ts` * `src/lib/actions/sandbox/rebuild-custom-image-preflight.test.ts` * `src/lib/actions/sandbox/rebuild-custom-image-preflight.ts` * `src/lib/actions/sandbox/rebuild-dcode-pre-delete-drift.test.ts` * `src/lib/actions/sandbox/rebuild-dcode-preflight.ts` * `src/lib/actions/sandbox/rebuild-durable-config.ts` * `src/lib/actions/sandbox/rebuild-env-isolation.test.ts` * `src/lib/actions/sandbox/rebuild-env-isolation.ts` * `src/lib/actions/sandbox/rebuild-managed-image-preflight.ts` * `src/lib/actions/sandbox/rebuild-provider-preflight.test.ts` * `src/lib/actions/sandbox/rebuild-recreate-observability.test.ts` * `src/lib/actions/sandbox/rebuild-recreate-phase.ts` * `src/lib/actions/sandbox/rebuild-resume-config.ts` * `src/lib/actions/sandbox/rebuild-resume-session.test.ts` * `src/lib/actions/sandbox/rebuild-resume-session.ts` * `src/lib/actions/sandbox/rebuild-target-runtime.ts` * `src/lib/inference/selection.ts` * `src/lib/onboard.ts` * `src/lib/onboard/dockerfile-patch.ts` * `src/lib/onboard/machine/core-flow-phases.test.ts` * `src/lib/onboard/machine/core-flow-phases.ts` * `src/lib/onboard/machine/flow-context.test.ts` * `src/lib/onboard/machine/flow-context.ts` * `src/lib/onboard/machine/flow-phases/agent-policy-finalization.test.ts` * `src/lib/onboard/machine/flow-phases/preflight-gateway.test.ts` * `src/lib/onboard/machine/flow-phases/provider-sandbox.test.ts` * `src/lib/onboard/machine/flow-sequence.test.ts` * `src/lib/onboard/machine/flow-slices.test.ts` * `src/lib/onboard/machine/handlers/provider-inference-reasoning-effort-resume.test.ts` * `src/lib/onboard/machine/handlers/provider-inference-recovery-gating.test.ts` * `src/lib/onboard/machine/handlers/provider-inference-route-containment.test.ts` * `src/lib/onboard/machine/handlers/provider-inference-station-express.test.ts` * `src/lib/onboard/machine/handlers/provider-inference.test-support.ts` * `src/lib/onboard/machine/handlers/provider-inference.test.ts` * `src/lib/onboard/machine/handlers/provider-inference.ts` * `src/lib/onboard/machine/initial-flow-phases.test.ts` * `src/lib/onboard/reasoning-effort.test.ts` * `src/lib/onboard/reasoning-mode.ts` * `src/lib/onboard/sandbox-registration.test.ts` * `src/lib/onboard/sandbox-registration.ts` * `src/lib/onboard/setup-nim-flow.test.ts` * `src/lib/onboard/setup-nim-flow.ts` * `src/lib/onboard/setup-nim-selection.ts` * `src/lib/state/onboard-session-station-express.test.ts` * `src/lib/state/onboard-session.ts` * `test/dashboard-remote-bind-lifecycle.test.ts` * `test/generate-openclaw-config-reasoning-effort.test.ts` * `test/helpers/onboard-final-flow-phases.ts` * `test/helpers/rebuild-managed-image-preflight-harness.ts` * `test/onboard-resume-provider-recovery.test.ts` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
| "NEMOCLAW_CLOUD_EXPERIMENTAL_MODEL", | ||
| "NEMOCLAW_PREFERRED_API", | ||
| "NEMOCLAW_REASONING", | ||
| "NEMOCLAW_REASONING_EFFORT", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Exercise the new variable in the isolation behavior test.
The contract assertion proves that NEMOCLAW_REASONING_EFFORT is listed, but the behavioral test never sets it. Add a non-empty value to the fixture and assert it is removed during isolation and restored afterward; otherwise a regression in the actual cleanup path could pass.
As per path instructions, tests should provide behavioral confidence rather than implementation lock-in.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/lib/actions/sandbox/rebuild-env-isolation.test.ts` around lines 51 - 54,
Update the isolation behavior test fixture to assign a non-empty value to
NEMOCLAW_REASONING_EFFORT, then assert the value is absent during isolation and
restored afterward. Keep the existing contract assertion and test behavior for
the other environment variables unchanged.
Source: Path instructions
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/state/onboard-session-reasoning-effort.test.ts`:
- Around line 18-25: Remove the redundant if (!loaded) guard and its error throw
from requireLoadedSession, returning loaded directly after the existing expect
assertion.
In `@test/nemoclaw-start-reasoning-effort.test.ts`:
- Around line 13-19: Remove the explicit if guard from extractShellFunction
while preserving its missing-match error behavior. Reuse or introduce a throwing
helper, analogous to throwingBail in the sibling resume test, so the regex match
still throws “Expected ${name} in scripts/nemoclaw-start.sh” when absent and
returns the reconstructed function when present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1ff98153-ad15-4ecf-ab56-ad6028baec5b
📒 Files selected for processing (28)
docs/inference/configure-model-capabilities.mdxdocs/inference/set-up-openai-compatible-endpoint.mdxdocs/reference/commands.mdxscripts/generate-openclaw-config.mtsscripts/nemoclaw-start.shsrc/commands/global-oclif-command-adapters.test.tssrc/commands/sandbox/inference/oclif-command-adapters.test.tssrc/lib/actions/inference-set-reasoning-effort.test.tssrc/lib/actions/inference-set.tssrc/lib/actions/sandbox/rebuild-env-isolation.test.tssrc/lib/actions/sandbox/rebuild-resume-config.test.tssrc/lib/actions/sandbox/rebuild-resume-config.tssrc/lib/onboard.tssrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/core-flow-phases.tssrc/lib/onboard/machine/handlers/provider-inference-reasoning-effort-resume.test.tssrc/lib/onboard/machine/handlers/provider-inference.test-support.tssrc/lib/onboard/machine/handlers/provider-inference.tssrc/lib/onboard/machine/initial-flow-phases.test.tssrc/lib/onboard/reasoning-effort.test.tssrc/lib/onboard/reasoning-mode.tssrc/lib/onboard/sandbox-registration.test.tssrc/lib/onboard/sandbox-registration.tssrc/lib/state/onboard-session-reasoning-effort.test.tssrc/lib/state/onboard-session.tstest/generate-openclaw-config-reasoning-effort.test.tstest/helpers/onboard-final-flow-phases.tstest/nemoclaw-start-reasoning-effort.test.ts
💤 Files with no reviewable changes (1)
- test/helpers/onboard-final-flow-phases.ts
🚧 Files skipped from review as they are similar to previous changes (14)
- src/lib/onboard/sandbox-registration.ts
- src/lib/onboard/machine/initial-flow-phases.test.ts
- src/lib/actions/sandbox/rebuild-env-isolation.test.ts
- src/lib/onboard/machine/core-flow-phases.ts
- src/lib/actions/sandbox/rebuild-resume-config.ts
- scripts/generate-openclaw-config.mts
- src/lib/onboard/sandbox-registration.test.ts
- docs/inference/configure-model-capabilities.mdx
- src/lib/onboard/machine/handlers/provider-inference.ts
- src/lib/onboard/reasoning-effort.test.ts
- docs/reference/commands.mdx
- src/lib/onboard/machine/core-flow-phases.test.ts
- src/lib/state/onboard-session.ts
- src/lib/actions/inference-set.ts
| function extractShellFunction(name: string): string { | ||
| const match = src.match(new RegExp(`${name}\\(\\) \\{([\\s\\S]*?)^\\}`, "m")); | ||
| if (!match) { | ||
| throw new Error(`Expected ${name} in scripts/nemoclaw-start.sh`); | ||
| } | ||
| return `${name}() {${match[1]}\n}`; | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
CI growth guardrail fails on the new if statement.
Pipeline reports a conditional-count increase (0→1) for this new test file, tied to the if (!match) guard in extractShellFunction. Restructure to avoid the if (e.g., a throwing helper akin to throwingBail used in the sibling resume test) to satisfy the guardrail without changing behavior.
🔧 Proposed fix to avoid the `if` statement
+const throwingBail = (msg: string): never => {
+ throw new Error(msg);
+};
+
function extractShellFunction(name: string): string {
const match = src.match(new RegExp(`${name}\\(\\) \\{([\\s\\S]*?)^\\}`, "m"));
- if (!match) {
- throw new Error(`Expected ${name} in scripts/nemoclaw-start.sh`);
- }
- return `${name}() {${match[1]}\n}`;
+ return match
+ ? `${name}() {${match[1]}\n}`
+ : throwingBail(`Expected ${name} in scripts/nemoclaw-start.sh`);
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function extractShellFunction(name: string): string { | |
| const match = src.match(new RegExp(`${name}\\(\\) \\{([\\s\\S]*?)^\\}`, "m")); | |
| if (!match) { | |
| throw new Error(`Expected ${name} in scripts/nemoclaw-start.sh`); | |
| } | |
| return `${name}() {${match[1]}\n}`; | |
| } | |
| const throwingBail = (msg: string): never => { | |
| throw new Error(msg); | |
| }; | |
| function extractShellFunction(name: string): string { | |
| const match = src.match(new RegExp(`${name}\\(\\) \\{([\\s\\S]*?)^\\}`, "m")); | |
| return match | |
| ? `${name}() {${match[1]}\n}` | |
| : throwingBail(`Expected ${name} in scripts/nemoclaw-start.sh`); | |
| } |
🧰 Tools
🪛 ast-grep (0.44.1)
[warning] 13-13: Regular expression constructed from variable input detected. This can lead to Regular Expression Denial of Service (ReDoS) attacks if the variable contains malicious patterns. Use libraries like 'recheck' to validate regex safety or use static patterns.
Context: new RegExp(${name}\\(\\) \\{([\\s\\S]*?)^\\}, "m")
Note: [CWE-1333] Inefficient Regular Expression Complexity
(regexp-from-variable)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@test/nemoclaw-start-reasoning-effort.test.ts` around lines 13 - 19, Remove
the explicit if guard from extractShellFunction while preserving its
missing-match error behavior. Reuse or introduce a throwing helper, analogous to
throwingBail in the sibling resume test, so the regex match still throws
“Expected ${name} in scripts/nemoclaw-start.sh” when absent and returns the
reconstructed function when present.
Source: Pipeline failures
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/reference/commands.mdx (1)
3633-3633: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the incompatible-provider contract.
“A different provider clears the variable without reading it” is both misleading and conflicts with the PR requirement that provider-incompatible reasoning-effort input fails before lifecycle effects. Document rejection instead; the CLI cannot clear the caller’s environment variable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/reference/commands.mdx` at line 3633, Update the NEMOCLAW_REASONING_EFFORT documentation to state that incompatible providers reject the variable’s value before making lifecycle changes, rather than claiming they clear it. Preserve the compatible-endpoint behavior and clarify that the CLI cannot modify the caller’s environment variable.
🧹 Nitpick comments (1)
src/lib/actions/sandbox/doctor-inference.ts (1)
27-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the one-call forwarding wrapper.
resolveDoctorReasoningEffortadds a public layer without behavior. ImportgetEffectiveReasoningEffortdirectly indoctor.ts.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/actions/sandbox/doctor-inference.ts` around lines 27 - 31, Remove the resolveDoctorReasoningEffort wrapper and its export from doctor-inference.ts, then import and call getEffectiveReasoningEffort directly in doctor.ts while preserving the existing behavior and types.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/actions/sandbox/doctor-flow.test.ts`:
- Around line 297-300: Append the linked issue suffix “(`#7659`)” to the
parameterized test titles in doctor-flow.test.ts (lines 297-300),
status-flow.test.ts (lines 101-104), selection.test.ts (lines 65-68), and
jsonl-events.test.ts (lines 231-234), preserving their existing title text and
test behavior.
---
Outside diff comments:
In `@docs/reference/commands.mdx`:
- Line 3633: Update the NEMOCLAW_REASONING_EFFORT documentation to state that
incompatible providers reject the variable’s value before making lifecycle
changes, rather than claiming they clear it. Preserve the compatible-endpoint
behavior and clarify that the CLI cannot modify the caller’s environment
variable.
---
Nitpick comments:
In `@src/lib/actions/sandbox/doctor-inference.ts`:
- Around line 27-31: Remove the resolveDoctorReasoningEffort wrapper and its
export from doctor-inference.ts, then import and call
getEffectiveReasoningEffort directly in doctor.ts while preserving the existing
behavior and types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2fa82f9f-562e-446b-ae25-f48fa505081a
📒 Files selected for processing (18)
docs/inference/configure-model-capabilities.mdxdocs/reference/commands.mdxsrc/lib/actions/inference-set-reasoning-effort.test.tssrc/lib/actions/inference-set.tssrc/lib/actions/sandbox/doctor-flow.test.tssrc/lib/actions/sandbox/doctor-inference.tssrc/lib/actions/sandbox/doctor.tssrc/lib/actions/sandbox/status-flow.test.tssrc/lib/actions/sandbox/status-text.tssrc/lib/inference/selection.test.tssrc/lib/inference/selection.tssrc/lib/onboard.tssrc/lib/onboard/machine/events.tssrc/lib/onboard/machine/jsonl-events.test.tssrc/lib/onboard/machine/types.tssrc/lib/state/onboard-session-reasoning-effort.test.tstest/nemoclaw-start-reasoning-effort.test.tstest/support/status-flow-test-harness.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/lib/state/onboard-session-reasoning-effort.test.ts
- docs/inference/configure-model-capabilities.mdx
- src/lib/onboard.ts
- test/nemoclaw-start-reasoning-effort.test.ts
- src/lib/actions/inference-set-reasoning-effort.test.ts
- src/lib/actions/inference-set.ts
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry for NemoClaw v0.0.97 before the release plan captures `origin/main`. The entry groups the user-visible and maintainer-facing changes since v0.0.96 while preserving the Deferred dual-Station status, experimental runtime-identity boundary, and pending physical IGX validation. ## Changes - Add `docs/changelog/2026-07-28.mdx` with the parser-safe MDX SPDX comment and exact `## v0.0.97` heading. - Summarize the 43 merged PRs in the release range, omitting internal-only changes from the public entry and linking each grouped change to its most specific published documentation. - Keep the experimental Okta reference explicitly opt-in and outside normal onboarding, keep the two-Station path Deferred, and state that physical IGX Orin validation remains pending. ### Source summary - [#7440](#7440), [#7443](#7443), and [#7445](#7445) -> `docs/changelog/2026-07-28.mdx`: Document read-only host readiness reports and fail-closed platform qualification. - [#7030](#7030) -> `docs/changelog/2026-07-28.mdx`: Document the Deferred trusted two-Station vLLM evaluation. - [#7265](#7265) -> `docs/changelog/2026-07-28.mdx`: Document the bounded experimental direct-runner Okta runtime-identity reference. - [#7711](#7711) and [#7648](#7648) -> `docs/changelog/2026-07-28.mdx`: Document compatible-endpoint reasoning effort and retired NVIDIA Build model paths. - [#7746](#7746), [#7763](#7763), and [#7681](#7681) -> `docs/changelog/2026-07-28.mdx`: Document safe compatible-provider creation, replacement refusal, and narrow OpenShell bridge URL handling. - [#7641](#7641), [#7690](#7690), [#7631](#7631), and [#7710](#7710) -> `docs/changelog/2026-07-28.mdx`: Document paused-container recovery, recreation journaling, pre-mutation uninstall checks, and source-checkout OpenShell selection. - [#7624](#7624) and [#7762](#7762) -> `docs/changelog/2026-07-28.mdx`: Document Jetson release diagnostics and bounded render-device group propagation. - [#7639](#7639), [#7760](#7760), [#7721](#7721), and [#7761](#7761) -> `docs/changelog/2026-07-28.mdx`: Document Telegram, MCP media-type, Hermes image-mode, and locked-restart fixes. - [#7653](#7653) and [#7680](#7680) -> `docs/changelog/2026-07-28.mdx`: Document Deep Agents policy tasks and the bounded Claude Code OAuth path. - [#7679](#7679) -> `docs/changelog/2026-07-28.mdx`: Document the checksum-bound libssh2 and Python HTMLParser backports. - [#7655](#7655), [#7651](#7651), [#7664](#7664), [#7666](#7666), [#7670](#7670), [#7719](#7719), and [#7741](#7741) -> `docs/changelog/2026-07-28.mdx`: Document exact candidate E2E evidence, Launchable selection, diagnostic consolidation, and trusted WSL validation. ## 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 dated changelog contract, MDX header, heading uniqueness, and release-entry structure. - [ ] 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: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: The committed `docs/changelog/2026-07-28.mdx` blob exactly matches the reviewed file. Completeness, factual accuracy, link shape, parser-safe MDX header, one-sentence-per-line style, `.docs-skip` compliance, and bounded product claims passed. - Agent: Codex Desktop documentation writer subagent <!-- docs-review-head-sha: da6aa27 --> <!-- docs-review-agents-blob-sha: be20a09 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable; this PR changes only the dated changelog. - Station profile/scenario: Not applicable. - Result: Not applicable. - Supporting evidence: Not applicable. ## 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 release 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) — completed 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) - [ ] New doc pages include SPDX header and frontmatter (new pages only) — native changelog entries use the required parser-safe MDX SPDX comment and intentionally have no frontmatter. --- Signed-off-by: Charan Jagwani <cjagwani@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added improved host readiness reporting and Jetson onboarding guidance. * Added controls for reasoning effort with compatible endpoints and enhanced managed MCP discovery. * Improved Deep Agents task publication and preset support. * **Bug Fixes** * Hardened provider switching, sandbox recovery, uninstall behavior, and Telegram connectivity. * Improved container image integrity checks, media-type handling, and checksum validation. * Enhanced vLLM evaluation behavior and release diagnostics. * **Documentation** * Added the NemoClaw v0.0.97 changelog. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
NemoClaw exposed reasoning as a boolean only, so an automation client that requires an explicit reasoning-effort value could not express it through the public CLI and had to either drop the setting or edit lower-level runtime configuration. A compatible OpenAI endpoint now takes a reasoning effort through
NEMOCLAW_REASONING_EFFORTor--reasoning-effort, and NemoClaw carries the value through the same lifecycle state as the reasoning flag so it survives resume, rebuild, and recreation.Related Issue
Resolves #7659
Changes
src/lib/onboard/reasoning-mode.ts: add the effort normaliser, the request resolver, the resume-conflict reporter, and the environment helpers beside the existing reasoning-flag ones. Accepted values arelow,medium,high, anddefaultfor the unset state. A flag beats the variable, which is the deterministic precedence the issue asks for.src/commands/inference/set.tsandsrc/commands/sandbox/inference/set.ts: add--reasoning-effortto both grammars, restricted to the accepted values at parse time.src/lib/inference/selection.ts,src/lib/state/onboard-session.ts,src/lib/onboard/sandbox-registration.ts,src/lib/onboard/machine/,src/lib/onboard/setup-nim-*.ts: recordcompatibleEndpointReasoningEffortin selection, session, and registry state, gated on thecompatible-endpointprovider exactly as the reasoning flag is.src/lib/actions/sandbox/rebuild-*.ts: replay the recorded value through resume, rebuild, recreation, and both image preflights, and addNEMOCLAW_REASONING_EFFORTto the ambient-recreate isolation set so an unrelated onboard cannot contaminate a rebuild.Dockerfile,src/lib/onboard/dockerfile-patch.ts,scripts/nemoclaw-start.sh,scripts/generate-openclaw-config.mts: carry the value into the image and emit it asparams.extra_body.reasoning_efforton model entries whose route usesopenai-completions. OpenClaw mergesparams.extra_bodyintoopenai-completionsrequest bodies, so this is the configuration-level route to areasoning_effortthe endpoint actually receives; no direct OpenShell or agent-runtime change is required of the consumer.src/lib/actions/inference-set.ts: apply an explicit request to the running sandbox's config, preserve a recorded effort when the flag is omitted, and clear it ondefault.Reasoning effort reuses the existing reasoning-flag rails rather than introducing an abstraction, a fallback, or a compatibility path. The one new closed enum matches the value set the issue names, and
test/generate-openclaw-config-reasoning-effort.test.tsfails the build on any value outside it.Hermes is deliberately out of scope.
AGENTS.mdrequires a Hermes-specific repro or acceptance test before adding Hermes behavior for an OpenClaw issue, so the hardcodedagent.reasoning_effortinagents/hermes/config/hermes-config.tsis unchanged and remains a separate source of truth worth a follow-up issue.Type of Change
Quality Gates
2810852be; exact-base8d3e728b9binary-diff SHA-256104590fe8f861ed8bf25df00db17d45910c107c0387fc4f7a15956e471675d5a.npm run docsexits 0 andfern checkreports 0 errors, but it also reports 2 warnings that are present onmainand unrelated to this change, so the "builds without warnings" verification item below is left unchecked.Documentation Writer Review
docs-updateddocs/inference/configure-model-capabilities.mdx,docs/inference/set-up-openai-compatible-endpoint.mdx,docs/reference/commands.mdx. The review ran three times and returneddocs-blockedtwice before this result. Its first pass found that the reference page promised durability the code did not deliver:inference setpatchedparams.extra_body.reasoning_effortfor anyopenai-completionsroute, while the registry row kept the value only forcompatible-endpoint, so the next rebuild dropped it. Commit 4817d69 scopes the patch to that provider and adds a covering test. Its second pass caught an over-correction in that same commit, where the docs wrongly denied thatNEMOCLAW_REASONING_EFFORTacceptsdefault; commit a5df976 restores it and scopes the validation claim to the provider that actually validates. Commit 999b756 closes the remaining nit, where an explicit request wrote the session field for a provider whose registry row cannot record it. The review confirmed no other page needs a change and that no dated changelog entry belongs here.2810852bechange set aligns the reasoning-effort documentation with fail-closed provider/API validation;npm run docsand the documentation-writer review pass.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailable2810852bemaintainer follow-up suites pass: 173 inference-set tests plus 80 focused tests (253 total);npm run typecheck:cli,npm run checks,npm run docs, and diff-scopedprekhooks all pass.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
low|medium|high|default) for compatible OpenAI-completions routes.inference set --reasoning-effortandNEMOCLAW_REASONING_EFFORT(including runtime build/runtime propagation).