fix(inference): accept onboard provider aliases + guide dcode users (#6321) - #6378
Conversation
…6321) Two of the three defects reported in #6321 (the SSRF-guard facet is a security trust-model decision deferred to a separate maintainer review): Facet 1 — provider-name drift. `nemoclaw onboard` accepts installer-style provider keys (`anthropicCompatible`, `build`, `openai`, …) while `inference set` only accepted the OpenShell provider names (`compatible-anthropic-endpoint`, `nvidia-prod`, `openai-api`, …), so a sandbox onboarded with `NEMOCLAW_PROVIDER=anthropicCompatible` could not be switched with `inference set --provider anthropicCompatible` — the two commands used different vocabularies for the same provider. Add `normalizeInferenceSetProvider`, which maps the installer alias to its OpenShell provider name before validation (OpenShell names and unknown values pass through unchanged, so genuinely unsupported providers still error). The alias table mirrors REMOTE_PROVIDER_CONFIG[key].providerName / getEffectiveProviderName() in src/lib/onboard/providers.ts; a sync test asserts every alias resolves to a SUPPORTED_PROVIDER_NAMES entry so the two lists cannot drift. The normalized name is what gets persisted, keeping the registry canonical. Facet 3 — Deep Agents (dcode) refusal. `inference set` on a langchain-deepagents-code sandbox refused with a blunt "supports OpenClaw and Hermes" message and no next step. dcode bakes its model into the sandbox image at build time (ARG NEMOCLAW_MODEL → ~/.deepagents/config.toml), so it genuinely has no runtime inference-set path. Keep the refusal (the safety contract is correct) but append an actionable hint pointing dcode users at the only supported way to change the model: re-onboard with a new selection. The hint fires only for langchain-deepagents-code; other unsupported agents keep the original message. Regression coverage in inference-set-provider-alias.test.ts (9 cases): alias normalization + case/trim + passthrough + drift guard; runInferenceSet accepts `anthropicCompatible` end-to-end and persists the canonical name; genuinely-unsupported providers still rejected; dcode refusal carries the re-onboard hint while other agents do not. Fixes #6321 Signed-off-by: Yanyun Liao <yanyunl@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:
📝 WalkthroughWalkthrough
ChangesProvider normalization and inference-set guidance
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Findings index
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 1 in-scope improvement
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/actions/inference-set.ts (1)
141-155: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winKeep installer aliases aligned with the onboard provider config
src/lib/actions/inference-set.ts: this local alias map duplicatessrc/lib/onboard/providers.ts, so it can drift when a provider name or alias changes. Derive it from the onboard config or add a parity check that covers both keys and values.🤖 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/inference-set.ts` around lines 141 - 155, The local INSTALLER_PROVIDER_ALIASES map in inference-set.ts is duplicating the onboard provider aliases and can drift from the source of truth. Update the alias handling in inference-set to derive from the onboard provider config in providers.ts, or add a parity check that validates both keys and mapped values stay in sync with that config. Use the INSTALLER_PROVIDER_ALIASES symbol and the onboarding provider mapping as the single reference point for future alias changes.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.
Nitpick comments:
In `@src/lib/actions/inference-set.ts`:
- Around line 141-155: The local INSTALLER_PROVIDER_ALIASES map in
inference-set.ts is duplicating the onboard provider aliases and can drift from
the source of truth. Update the alias handling in inference-set to derive from
the onboard provider config in providers.ts, or add a parity check that
validates both keys and mapped values stay in sync with that config. Use the
INSTALLER_PROVIDER_ALIASES symbol and the onboarding provider mapping as the
single reference point for future alias changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c7cf92c1-f221-4e26-9a64-eb746fee87c5
📒 Files selected for processing (2)
src/lib/actions/inference-set-provider-alias.test.tssrc/lib/actions/inference-set.ts
…facet 2)
Real-environment verification of the earlier identity-match attempt showed
it never fired: after a normal onboard the endpoint URL is NOT persisted to
the sandbox registry entry (entry.endpointUrl is null), the single
onboard-session.json is overwritten by the next onboard, and OpenShell does
not expose the gateway provider's registered base-URL value — so there is no
readable, per-sandbox durable endpoint to identity-match against. (The unit
tests passed only because they set entry.endpointUrl explicitly, masking the
gap.)
Replace the identity-match plumbing with guidance that does NOT weaken the
SSRF guard. Two facts make this the right shape:
- `inference set` never repoints the OpenShell gateway (openshellInferenceSetArgs
passes only provider + model); the endpoint is fixed at onboard time.
- A same-provider model switch therefore does not need --endpoint-url at
all — the gateway keeps the route onboard established.
So when normalizeCustomEndpointUrl's DNS-pinning guard blocks an internal
--endpoint-url AND the sandbox is already on that provider, append an
actionable hint: drop --endpoint-url to switch only the model (which reuses
the established route), and re-onboard/rebuild to actually change the
endpoint. The guard itself is unchanged — a genuinely new internal endpoint,
or a switch to a different provider, still errors with no bypass.
Verified end-to-end on a real test sandbox onboarded against an
internal-resolving Inference Hub endpoint:
- facet 1: `inference set --provider custom` now switches the model
(was "Unsupported provider 'custom'"); `anthropicCompatible` no longer
rejected as unsupported.
- facet 2: the same internal --endpoint-url is still blocked but now
carries the omit-the-flag guidance; dropping the flag switches the model.
- facet 3: dcode refusal carries the re-onboard hint.
Refs #6321
Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/inference-set.ts`:
- Around line 651-679: The same-provider hint is being appended to all
InferenceSetError cases from normalizeCustomEndpointUrl, which can produce
contradictory guidance for non-SSRF failures like the custom-metadata required
error. Update the catch in inference-set.ts so the extra “omit --endpoint-url”
message is only added for the SSRF/blocked-endpoint case, not every
InferenceSetError, by checking the specific error content or type before
wrapping it and leaving other normalizeCustomEndpointUrl errors unchanged.
🪄 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: 1b30b96e-7990-4961-8927-94ff02b73326
📒 Files selected for processing (2)
src/lib/actions/inference-set-provider-alias.test.tssrc/lib/actions/inference-set.ts
…6321) Rework the facet-2 test double and the alias-parity test to satisfy CI: - The stand-in DNS-pinning guard now parses new URL(value).hostname and checks Set membership instead of a whole-URL substring match, so CodeQL no longer flags it as incomplete URL sanitization (a substring like "inference-api.nvidia.com" could otherwise appear anywhere in the URL). - Replace the two `if` statements (the guard stub and the parity loop's skip guard) with a ternary and a .map().filter() chain so changed test files add no `if` statements, satisfying codebase-growth-guardrails. No behavioral change to the fix under test; the 13 cases still pass. Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
…6321) The catch in explicitCustomProviderMetadata augmented every InferenceSetError from normalizeCustomEndpointUrl with the "omit --endpoint-url to switch only the model" guidance. That helper also throws "endpoint-url is required for custom-compatible metadata." when --credential-env or --inference-api is passed without --endpoint-url on a same-provider sandbox, producing a self- contradictory message ("endpoint-url is required ... omit --endpoint-url"). Gate the augmentation to the SSRF/DNS-pinning rejection only, via a shared ENDPOINT_URL_NOT_ALLOWED_PREFIX constant, and add a test locking in that the missing-URL error is left unaugmented (and the guard is never consulted). Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
The safe alias/guidance change does not resolve the explicit same-URL provider switch that #6321 reports, so the PR should not claim to close every facet. Re-scope Closes to Refs and track durable endpoint identity separately rather than weakening SSRF. Correct the message that suggests a plain rebuild can choose another endpoint (rebuild has no endpoint flag and normally reuses recorded/session state), document the new aliases/recovery behavior, and add exact anthropicCompatible plus shell-metacharacter quoting tests. Rerun the Review Advisor afterward.
…vider-alias-dcode-6321
…x hint (#6321) Address maintainer review on #6378: - Correct the same-provider SSRF guidance message: re-running onboarding is what points a sandbox at a different endpoint; rebuild has no endpoint flag and reuses the recorded endpoint/session state, so it cannot change the endpoint. Update the user-facing message and the accompanying comment. - Document the new installer provider aliases (e.g. anthropicCompatible -> compatible-anthropic-endpoint) and the same-provider model-switch recovery (omit --endpoint-url) in docs/inference/switch-inference-providers.mdx. - Add tests: the installer alias is normalized to the exact canonical OpenShell provider name before it reaches the gateway argv, and the dcode re-onboard hint shell-quotes the sandbox name (defense-in-depth over name validation). Refs #6321 Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-6378.docs.buildwithfern.com/nemoclaw |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/inference-set-provider-alias.test.ts`:
- Around line 218-227: The test is treating the result of runInferenceSet as an
Error | InferenceSetResult union, so error.message is not safe to access
directly. Update the test to explicitly narrow the caught value from
runInferenceSet with an instanceof Error check (or equivalent type guard) before
asserting on message, using the runInferenceSet call and the error variable in
inference-set-provider-alias.test.ts as the key locations.
🪄 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: 986b4b8b-4771-42ca-9c45-11ae7ce09cee
📒 Files selected for processing (3)
docs/inference/switch-inference-providers.mdxsrc/lib/actions/inference-set-provider-alias.test.tssrc/lib/actions/inference-set.ts
✅ Files skipped from review due to trivial changes (1)
- docs/inference/switch-inference-providers.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/inference-set.ts
#6321) Use rejects.toThrow(substring) instead of catching the promise: runInferenceSet resolves to InferenceSetResult, so `.catch(... as Error)` typed the value as `Error | InferenceSetResult` and `.message` failed strict typecheck. toThrow does the same substring assertion without the union. Refs #6321 Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
…6321) Address the Review Advisor follow-ups (PRA-1..3) on #6378: - Add the structured design annotation (invalidState / sourceBoundary / whyNotSourceFix / regressionTest / removalCondition) to the facet-2 SSRF guidance branch, documenting why the fix is guidance rather than a source fix and the exact condition under which it should be replaced (a trusted, durable per-sandbox endpoint identity). - Widen tests: the same-URL SSRF branch on the anthropicCompatible provider family (reporter's exact case) still hits the guard and emits guidance; assert no sandbox/config mutation occurs after the rejection; and assert the dcode hint's shellQuote layer neutralizes spaces, quotes, ';', '$()' and backticks (defense-in-depth over name validation). Refs #6321 Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
…ion (#6321) Address Review Advisor PRA-2: add an expectNoInferenceMutation(deps.calls) helper and use it in both same-provider SSRF-guidance tests, asserting none of captureOpenshell, updateSandbox, writeSandboxConfig, recomputeSandboxConfigHash, updateSession, appendAuditEntry, or restartSandboxGateway run after the guard rejects — proving the security boundary leaves no half-applied state. Refs #6321 Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
…ity match (#6321) Turn facet 2 from guidance into a real fix. Onboarding persists the endpoint it established into the host-owned sandbox registry entry (entry.endpointUrl); that is a trusted, per-sandbox, durable baseline the sandbox cannot forge. explicitCustomProviderMetadata now canonically compares the operator-supplied --endpoint-url against that trusted endpoint (passed only when the sandbox is already on this provider). On a match it accepts the URL WITHOUT the DNS-pinning SSRF guard — re-validating the exact route onboarding already established adds no protection. Any mismatch, including a different internal endpoint, still runs the full guard, and a same-provider sandbox still gets the omit---endpoint-url guidance. Both sides are shape-normalized (no DNS); credentialed / non-http(s) URLs never match and fall through to the guard. Verified end-to-end on a real internal-resolving sandbox: re-supplying the recorded internal URL now switches the model; a different internal URL is still rejected; and the no-endpoint model switch still works. Also refresh the docs note and add identity-match + different-internal-endpoint regression tests. Closes #6321 Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
…explicit (#6321) Address Review Advisor PRA-1/PRA-2 on the same-endpoint SSRF bypass: document, in code beside the bypass, that the SSRF guard's threat model is the untrusted sandbox agent; that the trusted `entry.endpointUrl` lives in the host-owned registry the sandbox cannot write and is populated only by host onboarding/ rebuild (provider-recovery merely re-reads it, no sandbox-reachable writer); and that host-level registry tampering is an accepted, out-of-threat-model risk (such an attacker could call `inference set` directly), so no provenance marker is warranted. Records the regression tests and the removal condition (a sandbox-reachable or non-onboarding writer for endpointUrl would require one). Refs #6321 Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
|
Thanks for the review — all points addressed, and facet 2 is now a real fix rather than guidance. Review points
Facet 2 — now a durable-identity fix, no separate follow-up needed Verified end-to-end on a real internal-resolving sandbox: re-supplying the recorded internal URL now switches the model; a different internal URL is still rejected; a no-endpoint model switch still works. The trust boundary — host-owned registry the sandbox cannot write, populated only by onboarding/rebuild, with host-level registry tampering explicitly out of the SSRF guard's threat model — is documented in code next to the bypass. Re-ran the Review Advisor after each change (down to 0 required fixes). |
E2E Target Results — ✅ All requested jobs passedRun: 28884929483
|
|
@cv — maintainer follow-up confirming which of your requested changes the author has since implemented (verified against the current head
One open item is a genuine disagreement, not missing work: you asked to re-scope If the above resolves your concerns, could you re-review / clear the change request? Everything else (CI, E2E, advisors) is green. Signed-off-by: Prekshi Vyas prekshiv@nvidia.com |
cv
left a comment
There was a problem hiding this comment.
Current-head rereview on dd4cea269e: the alias normalization, dcode quoting/guidance, no-side-effect rejection coverage, and onboarding-vs-rebuild wording are fixed, but the core SSRF request remains unresolved. matchesTrustedEndpoint() proves only normalized URL-string equality (inference-set.ts:552-571), and an exact match then skips normalizeCustomEndpointUrl/DNS pinning (:710-716). The trusted value is an untagged nullable registry string (selection.ts:47-66), and the comment claiming only onboarding/rebuild can populate it is factually false because this same inference-set action persists endpointUrl at inference-set.ts:948-969. The new test at inference-set-provider-alias.test.ts:350-388 explicitly locks in that the guard is never called. Please either remove this bypass while preserving the safe omit---endpoint-url guidance, or add machine-checkable onboarding provenance plus missing/mismatched-provenance negative tests. Also update the stale PR body, which currently contradicts the implemented bypass.
…pplied endpoints (#6321) PR #6378 review (cv): the Facet-2 same-endpoint acceptance trusted a registry endpoint string that inference set itself persists (not solely onboarding/rebuild), so a string-equality match skipping DNS pinning was self-authorizing — a value this command wrote could later authorize an internal-resolving switch. Remove matchesTrustedEndpoint entirely; every supplied --endpoint-url now goes through the host DNS-pinning SSRF guard. The reporter's model-only switch is served by the safe path that already exists: omit --endpoint-url to reuse the established endpoint (the guard's rejection is turned into that guidance). Updated the locking test to assert a re-supplied internal URL is rejected with omit-guidance and the guard runs, and corrected the doc that claimed a re-supplied internal endpoint is accepted. Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@cv — you were right, and my earlier confirmation was wrong: I repeated the author's "endpointUrl is populated ONLY by host-side onboarding/rebuild" justification without verifying it. It's false — this same Implemented your option (a) on head
No provenance marker was added because the bypass is gone rather than gated. If you'd prefer to keep re-supply working via machine-checkable onboarding provenance instead, say so and I'll implement that path; otherwise this closes the SSRF concern outright. Could you re-review? |
…moval (#6321) Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
E2E Target Results — ✅ All requested jobs passedRun: 28888246145
|
E2E Target Results — ✅ All requested jobs passedRun: 28889178520
|
cv
left a comment
There was a problem hiding this comment.
Approved exact head cb87b89. The prior string-equality SSRF bypass is removed, every supplied endpoint remains DNS/SSRF guarded, the linked issue acceptance has been corrected, CodeRabbit has no unresolved findings, and the primary PR Review Advisor is merge_as_is. All attached CI is green, and the required hosted and Anthropic-compatible OpenClaw inference-switch E2Es both passed in run 28889178520. The remaining stale-comment cleanup is nonblocking and can be handled separately without invalidating this exact-head evidence.
<!-- markdownlint-disable MD041 --> ## Summary Prepares the user-facing documentation for NemoClaw v0.0.76 and closes the release-prep documentation gate. It adds the release highlights, documents the arm64 Local NIM warning and expanded image cleanup behavior, and fixes agent-specific command headings in generated guides. ## Changes - Add the v0.0.76 release-notes section and move the shared-gateway route containment entry out of the v0.0.74 history where it was incorrectly placed. - Document the advisory Linux arm64 Local NIM manifest warning in the canonical platform matrix and local-inference guidance. - Document that `gc` scans both gateway-built and locally prebuilt sandbox image repositories. - Keep OpenClaw and Hermes session headings out of the generated Deep Agents command guide. - Add a focused variant regression test for the agent-specific session headings. ### Source summary | Merged sources | Documentation coverage | | --- | --- | | [#6414](#6414), [#6418](#6418), [#6416](#6416), [#6344](#6344) | v0.0.76 release notes and the Deep Agents quickstart/inference routes | | [#6340](#6340) | v0.0.76 release notes and existing Deep Agents observability guidance | | [#6338](#6338), [#6378](#6378), [#6297](#6297) | v0.0.76 release notes and existing inference/troubleshooting guidance | | [#6362](#6362) | v0.0.76 release notes and existing lifecycle, command, and credential guidance | | [#6330](#6330), [#6307](#6307), [#6008](#6008) | v0.0.76 release notes and existing security, troubleshooting, and command guidance | | [#6382](#6382) | v0.0.76 release notes and existing MCP/command guidance | | [#6326](#6326), [#5868](#5868), [#5539](#5539) | v0.0.76 release notes, platform matrix, inference options, and local-inference guidance | | [#6396](#6396), [#6390](#6390), [#6007](#6007) | v0.0.76 release notes and existing messaging guidance | | [#5388](#5388), [#6249](#6249), [#6303](#6303), [#6306](#6306) | v0.0.76 release notes and command/lifecycle guidance | ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] 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 the DCO sign-off declaration 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 --project integration test/generate-platform-docs.test.ts test/agent-variant-docs.test.ts test/sync-agent-variant-docs.test.ts` (3 files, 29 tests passed) - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [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) --- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added v0.0.76 release notes content, and removed an older conflicting bullet from the surrounding release history. * Expanded Local NVIDIA NIM guidance across inference/provider docs, including an advisory for Linux arm64 DGX Spark/DGX Station hosts when a matching `linux/arm64` image manifest is unavailable. * Updated the command reference for correct session-section rendering and clarified `gc` image cleanup sources. * **Tests** * Added coverage ensuring Deep Agents omits sessions headings while Hermes includes them. * **CI** * Refreshed Local NVIDIA NIM provider notes used in the platform matrix. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
…VIDIA#6321) (NVIDIA#6378) <!-- markdownlint-disable MD041 --> ## Summary `nemoclaw inference set` was unusable in the three ways NVIDIA#6321 reports. This PR fixes all three, each verified end-to-end on a real test sandbox onboarded against an internal-resolving Inference Hub endpoint. Facet 2 is served by guidance, not by accepting a re-supplied internal endpoint: `inference set` never skips the DNS-pinning SSRF guard for a supplied `--endpoint-url` (trusting the recorded registry value would be self-authorizing, since `inference set` itself persists it), and instead guides the user to omit `--endpoint-url` to reuse the endpoint onboarding established. A different internal endpoint is likewise blocked. See the PR NVIDIA#6378 review thread. - **Facet 1 — provider-name drift.** `onboard` accepts installer-style keys (`anthropicCompatible`, `build`, `openai`, …); `inference set` only accepted the OpenShell names. Normalize the installer alias to its OpenShell name before validation. - **Facet 2 — SSRF guard vs onboard.** `inference set --endpoint-url <internal-hub>` was blocked by the DNS-pinning SSRF guard while onboard accepted the same URL. The guard is correct and stays, and `inference set` never skips it for a supplied `--endpoint-url`. Rather than accept a re-supplied internal endpoint, the fix turns the dead-end into guidance: on a same-provider sandbox, omit `--endpoint-url` to switch only the model (the gateway keeps the route onboard established). A different internal endpoint stays blocked. - **Facet 3 — Deep Agents (dcode) refused with no next step.** dcode bakes its model at image-build time, so it has no runtime inference-set path. Keep the refusal, append an actionable re-onboard hint. Refs NVIDIA#6321. ## Facet 2 — guidance, not a guard bypass (security-reviewed) `inference set` never repoints the OpenShell gateway (`openshellInferenceSetArgs` passes only provider + model), so a same-provider **model** switch does not need `--endpoint-url` at all — the gateway keeps the endpoint onboarding established. The DNS-pinning SSRF guard therefore stays fully authoritative for every supplied `--endpoint-url`; when it blocks an internal URL on a same-provider sandbox, the error appends actionable guidance: drop `--endpoint-url` to switch only the model, or re-onboard to change the endpoint. > An earlier revision of this PR accepted the exact recorded endpoint via a string-equality identity match against `entry.endpointUrl` (skipping the guard on a match). **That was removed in review (PR NVIDIA#6378):** `entry.endpointUrl` is not exclusively onboarding-provenanced — this same `inference set` action persists it — so trusting the recorded string to skip the guard would be self-authorizing (a value this command wrote could later authorize an internal-resolving switch). No provenance marker was added because the bypass is gone entirely rather than gated. Two facts shape the safe fix: 1. `inference set` never repoints the OpenShell gateway (`openshellInferenceSetArgs` passes only provider + model); the endpoint is fixed at onboard time. 2. A same-provider model switch therefore does **not** need `--endpoint-url` at all — the gateway keeps the route onboard established. So the guard is unchanged. When it blocks an internal `--endpoint-url` **and** the sandbox is already on that provider, the error now appends: drop `--endpoint-url` to switch only the model (reuses the established route), and re-onboard/rebuild to actually change the endpoint. A genuinely new internal endpoint, or a switch to a different provider, still errors with no bypass. ## Reproduction + Verification (real test machine) Test host: Ubuntu 24.04 x86_64 (no GPU). `inference-api.nvidia.com` resolves to an internal `10.48.x.x` address there (same condition as the reporter's network), so the SSRF path is exercised for real. Fresh sandboxes onboarded via `NEMOCLAW_PROVIDER=custom` (openclaw `infra-6321`) and `--agent dcode` (`dcode-6321`). **Before (v0.0.74, real sandboxes):** ``` # Facet 1 $ nemoclaw infra-6321 inference set --provider anthropicCompatible --model <m> Unsupported provider 'anthropicCompatible'. Supported providers: ... $ echo $? 2 $ nemoclaw infra-6321 inference set --provider custom --model <m> Unsupported provider 'custom'. ... (exit 2) # Facet 2 (same Hub URL onboard just accepted; resolves to 10.48.203.205) $ nemoclaw infra-6321 inference set --provider compatible-endpoint --endpoint-url https://inference-api.nvidia.com/v1 --model <m> endpoint-url is not allowed: URL hostname "inference-api.nvidia.com" resolves to private/internal address "10.48.203.205". ... (exit 2, dead-end) # Facet 3 $ nemoclaw dcode-6321 inference set --provider nvidia-prod --model <m> nemoclaw inference set supports OpenClaw and Hermes sandboxes; 'dcode-6321' uses 'langchain-deepagents-code'. (exit 2, no next step) ``` **After (this branch, same real sandboxes):** ``` # Facet 1 — installer name accepted; same-provider switch succeeds $ nemoclaw infra-6321 inference set --provider custom --model <m> Setting OpenShell inference route: compatible-endpoint / <m> Inference route synced for 'infra-6321': ... (exit 0) # Facet 2 — guard still fires, now with guidance $ nemoclaw infra-6321 inference set --provider compatible-endpoint --endpoint-url https://inference-api.nvidia.com/v1 --model <m> endpoint-url is not allowed: ... resolves to private/internal address "10.48.203.205". ... This sandbox is already configured for 'compatible-endpoint'. To switch only the model, omit --endpoint-url — inference set reuses the endpoint onboarding already established ... To point the sandbox at a different endpoint, re-run onboarding or rebuild. (exit 2) # ... and the guided path works: $ nemoclaw infra-6321 inference set --provider compatible-endpoint --model <m> (no --endpoint-url) Inference route synced for 'infra-6321': ... (exit 0) # Facet 3 — refusal now actionable $ nemoclaw dcode-6321 inference set --provider nvidia-prod --model <m> nemoclaw inference set supports OpenClaw and Hermes sandboxes; 'dcode-6321' uses 'langchain-deepagents-code'. Deep Agents Code bakes its model into the sandbox image at build time, so it has no runtime inference-set path. To change the model, re-onboard with the new selection: `nemoclaw onboard --agent dcode --name 'dcode-6321' --fresh` ... (exit 2) ``` ## Changes - `src/lib/actions/inference-set.ts`: - `normalizeInferenceSetProvider` + `INSTALLER_PROVIDER_ALIASES` — accept the installer provider vocabulary onboard uses (facet 1); persists the canonical OpenShell name. - dcode branch of the unsupported-agent refusal appends a re-onboard hint (facet 3); the target sandbox name is `shellQuote`d. - `explicitCustomProviderMetadata` catches the SSRF-guard error and, for a same-provider sandbox, appends the omit-`--endpoint-url` guidance (facet 2). The guard is unchanged. - `src/lib/actions/inference-set-provider-alias.test.ts` (new): 13 cases — alias normalization + case/trim + passthrough + drift guard + **parity vs onboard's `getEffectiveProviderName`**; `anthropicCompatible` accepted end-to-end; dcode hint present / absent-for-other-agents; SSRF guard still fires + guidance appended + omit-flag path succeeds + no hint on provider switch. ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## Verification - [x] `npx vitest run --project cli src/lib/actions/inference-set-provider-alias.test.ts` — 13/13. - [x] Full `src/lib/actions/inference-set*.test.ts` — 101/101 (no regressions). - [x] `npm run build:cli` passes; `npx prek run … --stage pre-commit` clean (Biome + repository-checks). - [x] End-to-end on a real test sandbox against an internal-resolving endpoint (transcripts above): facet 1 switch succeeds, facet 2 guard-holds + guidance + omit-flag works, facet 3 hint present. - [x] No secrets, API keys, or credentials committed. ## AI Disclosure - [x] AI-assisted — tool: Claude Code Signed-off-by: Yanyun Liao <yanyunl@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Installer-style provider names are now accepted for inference-set provider selection and automatically normalized to the canonical provider. * **Bug Fixes** * Same-provider model-only switches can omit `--endpoint-url`; when endpoint URLs are blocked, the error now guides users to omit `--endpoint-url`. * Deep Agents Code incompatibility errors now include a more specific re-onboarding remediation hint. * **Documentation** * Added an “Installer Provider Aliases” section and clarified endpoint URL omission behavior for model-only changes. * **Tests** * Added regression and parity checks to prevent provider alias/name drift and validate error-message behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Yanyun Liao <yanyunl@nvidia.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
<!-- markdownlint-disable MD041 --> ## Summary Prepares the user-facing documentation for NemoClaw v0.0.76 and closes the release-prep documentation gate. It adds the release highlights, documents the arm64 Local NIM warning and expanded image cleanup behavior, and fixes agent-specific command headings in generated guides. ## Changes - Add the v0.0.76 release-notes section and move the shared-gateway route containment entry out of the v0.0.74 history where it was incorrectly placed. - Document the advisory Linux arm64 Local NIM manifest warning in the canonical platform matrix and local-inference guidance. - Document that `gc` scans both gateway-built and locally prebuilt sandbox image repositories. - Keep OpenClaw and Hermes session headings out of the generated Deep Agents command guide. - Add a focused variant regression test for the agent-specific session headings. ### Source summary | Merged sources | Documentation coverage | | --- | --- | | [NVIDIA#6414](NVIDIA#6414), [NVIDIA#6418](NVIDIA#6418), [NVIDIA#6416](NVIDIA#6416), [NVIDIA#6344](NVIDIA#6344) | v0.0.76 release notes and the Deep Agents quickstart/inference routes | | [NVIDIA#6340](NVIDIA#6340) | v0.0.76 release notes and existing Deep Agents observability guidance | | [NVIDIA#6338](NVIDIA#6338), [NVIDIA#6378](NVIDIA#6378), [NVIDIA#6297](NVIDIA#6297) | v0.0.76 release notes and existing inference/troubleshooting guidance | | [NVIDIA#6362](NVIDIA#6362) | v0.0.76 release notes and existing lifecycle, command, and credential guidance | | [NVIDIA#6330](NVIDIA#6330), [NVIDIA#6307](NVIDIA#6307), [NVIDIA#6008](NVIDIA#6008) | v0.0.76 release notes and existing security, troubleshooting, and command guidance | | [NVIDIA#6382](NVIDIA#6382) | v0.0.76 release notes and existing MCP/command guidance | | [NVIDIA#6326](NVIDIA#6326), [NVIDIA#5868](NVIDIA#5868), [NVIDIA#5539](NVIDIA#5539) | v0.0.76 release notes, platform matrix, inference options, and local-inference guidance | | [NVIDIA#6396](NVIDIA#6396), [NVIDIA#6390](NVIDIA#6390), [NVIDIA#6007](NVIDIA#6007) | v0.0.76 release notes and existing messaging guidance | | [NVIDIA#5388](NVIDIA#5388), [NVIDIA#6249](NVIDIA#6249), [NVIDIA#6303](NVIDIA#6303), [NVIDIA#6306](NVIDIA#6306) | v0.0.76 release notes and command/lifecycle guidance | ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] 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 the DCO sign-off declaration 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 --project integration test/generate-platform-docs.test.ts test/agent-variant-docs.test.ts test/sync-agent-variant-docs.test.ts` (3 files, 29 tests passed) - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [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) --- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added v0.0.76 release notes content, and removed an older conflicting bullet from the surrounding release history. * Expanded Local NVIDIA NIM guidance across inference/provider docs, including an advisory for Linux arm64 DGX Spark/DGX Station hosts when a matching `linux/arm64` image manifest is unavailable. * Updated the command reference for correct session-section rendering and clarified `gc` image cleanup sources. * **Tests** * Added coverage ensuring Deep Agents omits sessions headings while Hermes includes them. * **CI** * Refreshed Local NVIDIA NIM provider notes used in the platform matrix. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Summary
nemoclaw inference setwas unusable in the three ways #6321 reports. This PR fixes all three, each verified end-to-end on a real test sandbox onboarded against an internal-resolving Inference Hub endpoint. Facet 2 is served by guidance, not by accepting a re-supplied internal endpoint:inference setnever skips the DNS-pinning SSRF guard for a supplied--endpoint-url(trusting the recorded registry value would be self-authorizing, sinceinference setitself persists it), and instead guides the user to omit--endpoint-urlto reuse the endpoint onboarding established. A different internal endpoint is likewise blocked. See the PR #6378 review thread.onboardaccepts installer-style keys (anthropicCompatible,build,openai, …);inference setonly accepted the OpenShell names. Normalize the installer alias to its OpenShell name before validation.inference set --endpoint-url <internal-hub>was blocked by the DNS-pinning SSRF guard while onboard accepted the same URL. The guard is correct and stays, andinference setnever skips it for a supplied--endpoint-url. Rather than accept a re-supplied internal endpoint, the fix turns the dead-end into guidance: on a same-provider sandbox, omit--endpoint-urlto switch only the model (the gateway keeps the route onboard established). A different internal endpoint stays blocked.Refs #6321.
Facet 2 — guidance, not a guard bypass (security-reviewed)
inference setnever repoints the OpenShell gateway (openshellInferenceSetArgspasses only provider + model), so a same-provider model switch does not need--endpoint-urlat all — the gateway keeps the endpoint onboarding established. The DNS-pinning SSRF guard therefore stays fully authoritative for every supplied--endpoint-url; when it blocks an internal URL on a same-provider sandbox, the error appends actionable guidance: drop--endpoint-urlto switch only the model, or re-onboard to change the endpoint.Two facts shape the safe fix:
inference setnever repoints the OpenShell gateway (openshellInferenceSetArgspasses only provider + model); the endpoint is fixed at onboard time.--endpoint-urlat all — the gateway keeps the route onboard established.So the guard is unchanged. When it blocks an internal
--endpoint-urland the sandbox is already on that provider, the error now appends: drop--endpoint-urlto switch only the model (reuses the established route), and re-onboard/rebuild to actually change the endpoint. A genuinely new internal endpoint, or a switch to a different provider, still errors with no bypass.Reproduction + Verification (real test machine)
Test host: Ubuntu 24.04 x86_64 (no GPU).
inference-api.nvidia.comresolves to an internal10.48.x.xaddress there (same condition as the reporter's network), so the SSRF path is exercised for real. Fresh sandboxes onboarded viaNEMOCLAW_PROVIDER=custom(openclawinfra-6321) and--agent dcode(dcode-6321).Before (v0.0.74, real sandboxes):
After (this branch, same real sandboxes):
Changes
src/lib/actions/inference-set.ts:normalizeInferenceSetProvider+INSTALLER_PROVIDER_ALIASES— accept the installer provider vocabulary onboard uses (facet 1); persists the canonical OpenShell name.shellQuoted.explicitCustomProviderMetadatacatches the SSRF-guard error and, for a same-provider sandbox, appends the omit---endpoint-urlguidance (facet 2). The guard is unchanged.src/lib/actions/inference-set-provider-alias.test.ts(new): 13 cases — alias normalization + case/trim + passthrough + drift guard + parity vs onboard'sgetEffectiveProviderName;anthropicCompatibleaccepted end-to-end; dcode hint present / absent-for-other-agents; SSRF guard still fires + guidance appended + omit-flag path succeeds + no hint on provider switch.Type of Change
Verification
npx vitest run --project cli src/lib/actions/inference-set-provider-alias.test.ts— 13/13.src/lib/actions/inference-set*.test.ts— 101/101 (no regressions).npm run build:clipasses;npx prek run … --stage pre-commitclean (Biome + repository-checks).AI Disclosure
Signed-off-by: Yanyun Liao yanyunl@nvidia.com
Summary by CodeRabbit
--endpoint-url; when endpoint URLs are blocked, the error now guides users to omit--endpoint-url.