feat(inference): add OpenRouter onboarding support#6461
Conversation
Signed-off-by: San Dang <sdang@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:
📝 WalkthroughWalkthroughAdds OpenRouter as a supported inference provider across configuration, onboarding, runtime handling, validation, tests, and docs. ChangesOpenRouter Provider Integration
Estimated code review effort: 4 (Complex) | ~60 minutes 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 remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-6461.docs.buildwithfern.com/nemoclaw |
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 — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
Review findings by urgency: 0 required fixes, 4 items to resolve/justify, 0 in-scope improvements
|
PR Review Advisor (Nemotron Ultra) — BlockedMerge posture: Do not merge until addressed Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/get-started/quickstart.mdx (1)
129-141: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winNumbered wizard-menu example is now stale.
The table below (lines 163-171) places OpenRouter as the second provider option, per the PR objective that OpenRouter is "positioned as the second inference option." But the sample terminal output block at lines 132-140 still shows the pre-OpenRouter menu (8 items, no OpenRouter entry). A user following this example would see a mismatched menu when actually running
nemoclaw onboard.📝 Proposed fix
```text 1) NVIDIA Endpoints - 2) OpenAI - 3) Other OpenAI-compatible endpoint - 4) Anthropic - 5) Other Anthropic-compatible endpoint - 6) Google Gemini - 7) Local Ollama (localhost:11434) - 8) Model Router (experimental) + 2) OpenRouter + 3) OpenAI + 4) Other OpenAI-compatible endpoint + 5) Anthropic + 6) Other Anthropic-compatible endpoint + 7) Google Gemini + 8) Local Ollama (localhost:11434) + 9) Model Router (experimental) Choose [1]:</details> Also applies to: 163-166 <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/get-started/quickstart.mdxaround lines 129 - 141, The quickstart’s
terminal example is stale: the wizard menu shown in the inference provider
prompt no longer matches the provider ordering used by the onboarding flow.
Update the sample output in the quickstart doc so it reflects the current
nemoclaw onboardmenu withOpenRouteras the second inference option and the
remaining entries renumbered accordingly, keeping the example consistent with
the provider table and the prompt displayed by the onboarding wizard.</details> <!-- cr-comment:v1:1c784d0e2769bcfb2cfd1ec9 --> </blockquote></details> </blockquote></details>🧹 Nitpick comments (3)
test/onboard-selection.test.ts (1)
565-601: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftMenu-index shifts look internally consistent.
Verified against sibling ordering comments elsewhere in the file (e.g. "vLLM is option 8 (build, openrouter, openai, custom, anthropic, anthropicCompatible, gemini, vllm)") — OpenAI=3, Other-OpenAI-compat=4, Anthropic=5, Other-Anthropic-compat=6, Gemini=7 all match a single insertion of OpenRouter at position 2.
Separately: this file relies on hardcoded numeric menu indices in many places, which required updating ~15 locations for this one insertion. The file already has a pattern-based alternative (
selectRecentMenuOption/menuSelections) used elsewhere in the same batch runner; consider migrating more scenarios to it to avoid this fragility on future menu reorders.🤖 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/onboard-selection.test.ts` around lines 565 - 601, The hardcoded menu indices in the onboarding selection tests are too brittle and required widespread updates after inserting a new option. Update the affected scenarios in onboard-selection.test.ts to prefer the existing pattern-based helpers like selectRecentMenuOption and menuSelections where possible, and keep the remaining numeric answers aligned with the current menu order using the referenced option labels such as OpenAI API key, Anthropic API key, Google Gemini API key, and the OpenAI/Anthropic-compatible endpoint entries.scripts/checks/direct-credential-env.ts (1)
17-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated credential-key inventory can silently drift from
SUPPORTED_CREDENTIAL_ENV_NAMES.
CREDENTIAL_ENV_KEYSis a hand-maintained subset that already diverges fromsrc/lib/security/credential-env.ts'sSUPPORTED_CREDENTIAL_ENV_NAMES(e.g. missingGOOGLE_API_KEY,NOUS_API_KEY,AWS_*,HF_TOKEN, etc.). AddingOPENROUTER_API_KEYhere manually, rather than deriving from the canonical inventory, means future credential env additions risk silently bypassing this direct-process.envguardrail check.Consider importing
SUPPORTED_CREDENTIAL_ENV_NAMESas the canonical source for this set instead of maintaining a parallel list.As per path instructions for
scripts/checks/**: "Derive inventories and limits from a canonical source where possible; flag duplicated lists that can silently drift."🤖 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 `@scripts/checks/direct-credential-env.ts` around lines 17 - 27, The direct credential env check is maintaining its own list in CREDENTIAL_ENV_KEYS, which can drift from the canonical inventory. Update the logic in direct-credential-env.ts to derive the set from SUPPORTED_CREDENTIAL_ENV_NAMES in src/lib/security/credential-env.ts instead of hardcoding names like OPENROUTER_API_KEY, so the guardrail automatically stays in sync with future credential additions.Source: Path instructions
src/lib/inference/config.ts (1)
271-278: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low valueOpenRouter is intentionally excluded from the Responses API path, but this creates an unreachable entry in
recovered-provider-reuse.ts.The exclusion is confirmed:
shouldSkipResponsesProbeexplicitly includes"openrouter-api"(line 317 invalidation.ts), forcinginferenceApi = "openai-completions". The test comment documents this as intentional: "OpenRouter uses Chat Completions here" (line 435 invalidation.test.ts).However,
recovered-provider-reuse.tsline 14 declaresopenrouter: new Set(["openai-completions", "openai-responses"]), which means theopenai-responsespath is unreachable in practice—shouldSkipResponsesProbeoverrides it toopenai-completionsbefore that configuration is consulted. Either the test comment should clarify why OpenRouter is limited to Chat Completions (e.g., due to beta concerns), or theopenai-responsesentry for OpenRouter inrecovered-provider-reuse.tsshould be removed to avoid the inconsistency.🤖 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/inference/config.ts` around lines 271 - 278, OpenRouter is intentionally routed away from the Responses API, so the `openrouter` entry in `recovered-provider-reuse.ts` is inconsistent with the actual flow. Update the configuration by removing the unreachable `openai-responses` option for OpenRouter, or adjust the related `validation.test.ts` expectation/comment to clearly explain why `shouldSkipResponsesProbe` in `validation.ts` forces `openai-completions` before reuse is consulted. Keep the behavior aligned across `OPENROUTER_PROVIDER_NAME`, `shouldSkipResponsesProbe`, and the recovered-provider reuse mapping.🤖 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/onboard.ts`: - Around line 3609-3629: The non-interactive OpenRouter credential check is still implemented inline in handleRemoteProviderSelection inside onboard.ts, but it should be moved into the existing validation flow. Route the OpenRouter API key check through the focused credential-navigation / inference-selection-validation validator path instead of duplicating validateOpenRouterApiKeyValue plus process.exit(1) here, and keep onboard.ts limited to wiring and selection flow. - Around line 3639-3642: The OpenRouter featured-model catalog path duplicates header resolution by calling openrouter.getOpenRouterCurlHeaders() instead of using getProbeExtraHeaders(state.provider), which can drift from the shared contract. Update the onboarding flow in onboard.ts, especially the featured-model catalog logic and any nearby header setup, to route all provider header resolution through getProbeExtraHeaders(state.provider) consistently. Keep the existing behavior for OpenRouter, but remove the direct OpenRouter-specific header call so the same helper is used everywhere. --- Outside diff comments: In `@docs/get-started/quickstart.mdx`: - Around line 129-141: The quickstart’s terminal example is stale: the wizard menu shown in the inference provider prompt no longer matches the provider ordering used by the onboarding flow. Update the sample output in the quickstart doc so it reflects the current `nemoclaw onboard` menu with `OpenRouter` as the second inference option and the remaining entries renumbered accordingly, keeping the example consistent with the provider table and the prompt displayed by the onboarding wizard. --- Nitpick comments: In `@scripts/checks/direct-credential-env.ts`: - Around line 17-27: The direct credential env check is maintaining its own list in CREDENTIAL_ENV_KEYS, which can drift from the canonical inventory. Update the logic in direct-credential-env.ts to derive the set from SUPPORTED_CREDENTIAL_ENV_NAMES in src/lib/security/credential-env.ts instead of hardcoding names like OPENROUTER_API_KEY, so the guardrail automatically stays in sync with future credential additions. In `@src/lib/inference/config.ts`: - Around line 271-278: OpenRouter is intentionally routed away from the Responses API, so the `openrouter` entry in `recovered-provider-reuse.ts` is inconsistent with the actual flow. Update the configuration by removing the unreachable `openai-responses` option for OpenRouter, or adjust the related `validation.test.ts` expectation/comment to clearly explain why `shouldSkipResponsesProbe` in `validation.ts` forces `openai-completions` before reuse is consulted. Keep the behavior aligned across `OPENROUTER_PROVIDER_NAME`, `shouldSkipResponsesProbe`, and the recovered-provider reuse mapping. In `@test/onboard-selection.test.ts`: - Around line 565-601: The hardcoded menu indices in the onboarding selection tests are too brittle and required widespread updates after inserting a new option. Update the affected scenarios in onboard-selection.test.ts to prefer the existing pattern-based helpers like selectRecentMenuOption and menuSelections where possible, and keep the remaining numeric answers aligned with the current menu order using the referenced option labels such as OpenAI API key, Anthropic API key, Google Gemini API key, and the OpenAI/Anthropic-compatible endpoint entries.🪄 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:
e6f293b1-cbca-46ad-99ee-0f48486b5ddd📒 Files selected for processing (50)
ci/platform-matrix.jsondocs/get-started/quickstart.mdxdocs/inference/inference-options.mdxdocs/inference/switch-inference-providers.mdxdocs/reference/commands.mdxdocs/reference/platform-support.mdxscripts/checks/direct-credential-env.tssrc/lib/actions/inference-set-provider-alias.test.tssrc/lib/actions/inference-set.tssrc/lib/adapters/http/auth-config.tssrc/lib/credentials/store.tssrc/lib/domain/installer/provider.test.tssrc/lib/domain/installer/provider.tssrc/lib/inference/config.test.tssrc/lib/inference/config.tssrc/lib/inference/model-prompts.test.tssrc/lib/inference/model-prompts.tssrc/lib/inference/nvidia-featured-models.test.tssrc/lib/inference/nvidia-featured-models.tssrc/lib/inference/onboard-probes.test.tssrc/lib/inference/onboard-probes.tssrc/lib/inference/openrouter.tssrc/lib/inference/provider-models.test.tssrc/lib/inference/provider-models.tssrc/lib/onboard.tssrc/lib/onboard/credential-navigation.tssrc/lib/onboard/inference-providers/types.tssrc/lib/onboard/inference-selection-validation.tssrc/lib/onboard/nvidia-featured-model-selection.test.tssrc/lib/onboard/nvidia-featured-model-selection.tssrc/lib/onboard/provider-menu.test.tssrc/lib/onboard/provider-menu.tssrc/lib/onboard/providers.test.tssrc/lib/onboard/providers.tssrc/lib/onboard/recovered-provider-reuse.test.tssrc/lib/onboard/recovered-provider-reuse.tssrc/lib/onboard/setup-nim-flow.test.tssrc/lib/onboard/setup-nim-flow.tssrc/lib/onboard/setup-nim-selection.tssrc/lib/security/credential-env.tssrc/lib/security/redact.tssrc/lib/validation.test.tssrc/lib/validation.tstest/e2e/live/snapshot-credential-scanner.tstest/e2e/support/snapshot-credential-scanner.test.tstest/onboard-openrouter-inference.test.tstest/onboard-resume-provider-recovery.test.tstest/onboard-selection.test.tstest/onboard.test.tstest/support/onboard-selection-test-helpers.ts
Signed-off-by: San Dang <sdang@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/onboard-selection.test.ts (1)
1258-1258: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffMenu index shifts are consistent with OpenRouter insertion, but magic-number selections remain fragile.
The numeric answer shifts (
"7"→"8","3"→"4") correctly account for OpenRouter's new position 2 in the provider menu, per the documented order at line 3863. However, these embedded scripts still hardcode positional menu indices rather than using the label-basedselectRecentMenuOptionpattern already adopted inPROCESS_CREDENTIAL_BACK_SCENARIOS(lines 693-705, 710-711). Any future menu reorder will again require touching a dozen call sites across this file.Also applies to: 1440-1440, 2222-2222, 2301-2301, 2402-2402, 2505-2505, 2608-2608, 3121-3121, 3749-3749, 3863-3868, 3967-3967, 3982-3983
🤖 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/onboard-selection.test.ts` at line 1258, The test scenarios in onboard-selection.test.ts still hardcode numeric menu picks, which makes them brittle when provider order changes. Update the affected scenario setups to use the same label-based selectRecentMenuOption approach already used in PROCESS_CREDENTIAL_BACK_SCENARIOS, and replace the positional answers in the referenced scenario arrays with menu-label selections for the corresponding prompts. Use the existing scenario builders and menu-selection helpers in this test file to keep the OpenRouter-related order changes isolated from future reordering.
🤖 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 `@test/onboard-selection.test.ts`:
- Line 1258: The test scenarios in onboard-selection.test.ts still hardcode
numeric menu picks, which makes them brittle when provider order changes. Update
the affected scenario setups to use the same label-based selectRecentMenuOption
approach already used in PROCESS_CREDENTIAL_BACK_SCENARIOS, and replace the
positional answers in the referenced scenario arrays with menu-label selections
for the corresponding prompts. Use the existing scenario builders and
menu-selection helpers in this test file to keep the OpenRouter-related order
changes isolated from future reordering.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ee529774-2452-4456-b308-e6157714d8d1
📒 Files selected for processing (15)
ci/test-file-size-budget.jsondocs/get-started/quickstart.mdxinstall.shscripts/checks/direct-credential-env.tsscripts/install.shsrc/lib/inference/onboard-probes.tssrc/lib/onboard.tssrc/lib/onboard/openrouter-selection.tssrc/lib/onboard/recovered-provider-reuse.test.tssrc/lib/onboard/recovered-provider-reuse.tssrc/lib/onboard/setup-nim-selection.tssrc/lib/security/credential-env.tstest/onboard-selection-anthropic-retry.test.tstest/onboard-selection.test.tstest/package-contract/onboard/compatible-endpoint-reasoning.test.ts
✅ Files skipped from review due to trivial changes (6)
- ci/test-file-size-budget.json
- test/package-contract/onboard/compatible-endpoint-reasoning.test.ts
- src/lib/security/credential-env.ts
- docs/get-started/quickstart.mdx
- scripts/install.sh
- install.sh
🚧 Files skipped from review as they are similar to previous changes (2)
- src/lib/inference/onboard-probes.ts
- src/lib/onboard/setup-nim-selection.ts
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
Signed-off-by: San Dang <sdang@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
src/lib/onboard/inference-providers/remote.ts (1)
202-208: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUpdate the stale comment to reflect the new OpenRouter short-circuit.
The comment says "the adapter branch above" (singular) but there are now two adapter short-circuits above (Bedrock and OpenRouter) that both bypass this OpenAI-surface logic.
✏️ Suggested tweak
- // Bedrock endpoints never reach here — the adapter branch above returns first. + // Bedrock and OpenRouter endpoints never reach here — the adapter branches above return first.🤖 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/inference-providers/remote.ts` around lines 202 - 208, Update the stale explanatory comment in the onboarding logic near the OpenAI-surface check so it matches the current control flow. The note in remote.ts still says only the adapter branch above returns first, but the logic now has two short-circuits before this path: the Bedrock branch and the OpenRouter branch. Adjust the comment text to mention both bypasses and keep it aligned with the surrounding onboarding conditions in the relevant remote provider flow.test/onboard-openrouter-inference.test.ts (1)
15-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse ESM import instead of
require()for this src module.
openrouter-runtime.tsuses plain named exports, so therequire()/opaque-typing workaround documented fordist/lib/onboarddoesn't apply here. As per coding guidelines,test/**/*.test.{js,ts}: "Use ESM (import/export) in root-level tests undertest/."♻️ Proposed fix
-const openrouterRuntimeOnboard = - require("../src/lib/onboard/openrouter-runtime") as typeof import("../src/lib/onboard/openrouter-runtime.js"); +import * as openrouterRuntimeOnboard from "../src/lib/onboard/openrouter-runtime.js";🤖 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/onboard-openrouter-inference.test.ts` around lines 15 - 16, The test is using a CommonJS require() workaround for a source module that already has named ESM exports, so switch the openrouterRuntimeOnboard import in the test to a normal ESM import from openrouter-runtime instead of requiring it. Keep the symbol name openrouterRuntimeOnboard the same so the rest of the test stays unchanged, and remove the opaque typeof import pattern that was only needed for dist/lib/onboard.Source: Coding guidelines
src/lib/onboard/openrouter-runtime.ts (1)
43-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLink the tracked retirement issue in the TODO.
Other temporary-bridge comments in this codebase reference a tracking issue number (e.g.
#6294in remote.ts). As per path instructions, temporary/bounded compatibility paths should "link the retirement issue or PR in GitHub, and state observable exit criteria."🤖 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/openrouter-runtime.ts` around lines 43 - 46, The temporary-bridge TODO in openrouter-runtime should reference the tracked retirement issue so it can be tied to a concrete exit plan. Update the comment near the OpenShell/OpenRouter onboarding path to include the GitHub issue or PR number, and keep the existing note about removing the local runtime adapter once provider-route middleware supports extra outbound headers; use the TODO in openrouter-runtime as the anchor for this update.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/inference/openrouter-runtime-adapter.ts`:
- Around line 164-221: Add an explicit timeout to the outbound OpenRouter proxy
request in forwardToOpenRouter so a stalled upstream cannot hang forever. Mirror
the timeout pattern used in probeAdapterHealth by setting a reasonable timeout
on the transport.request call and handling the timeout event by logging
request_failed, destroying the upstream request, and returning a 504-style error
through sendError or res.destroy as appropriate. Keep the fix scoped to
forwardToOpenRouter and the upstreamReq lifecycle.
- Around line 271-291: The adapter is currently started with a bind host that
exposes it on all interfaces, so tighten the network exposure in
startOpenRouterRuntimeAdapterFromEnv and the
OPENROUTER_RUNTIME_ADAPTER_BIND_HOST setting. Update the server bind target to
loopback or add equivalent network isolation so
createOpenRouterRuntimeAdapterServer() is only reachable locally, and keep the
existing adapter_ready logging consistent with the new bind host.
---
Nitpick comments:
In `@src/lib/onboard/inference-providers/remote.ts`:
- Around line 202-208: Update the stale explanatory comment in the onboarding
logic near the OpenAI-surface check so it matches the current control flow. The
note in remote.ts still says only the adapter branch above returns first, but
the logic now has two short-circuits before this path: the Bedrock branch and
the OpenRouter branch. Adjust the comment text to mention both bypasses and keep
it aligned with the surrounding onboarding conditions in the relevant remote
provider flow.
In `@src/lib/onboard/openrouter-runtime.ts`:
- Around line 43-46: The temporary-bridge TODO in openrouter-runtime should
reference the tracked retirement issue so it can be tied to a concrete exit
plan. Update the comment near the OpenShell/OpenRouter onboarding path to
include the GitHub issue or PR number, and keep the existing note about removing
the local runtime adapter once provider-route middleware supports extra outbound
headers; use the TODO in openrouter-runtime as the anchor for this update.
In `@test/onboard-openrouter-inference.test.ts`:
- Around line 15-16: The test is using a CommonJS require() workaround for a
source module that already has named ESM exports, so switch the
openrouterRuntimeOnboard import in the test to a normal ESM import from
openrouter-runtime instead of requiring it. Keep the symbol name
openrouterRuntimeOnboard the same so the rest of the test stays unchanged, and
remove the opaque typeof import pattern that was only needed for
dist/lib/onboard.
🪄 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: 15e02baf-3dab-4c92-be58-514dc9eb1298
📒 Files selected for processing (18)
ci/env-var-doc-allowlist.jsonci/platform-matrix.jsondocs/inference/inference-options.mdxdocs/reference/platform-support.mdxsrc/lib/core/ports.test.tssrc/lib/core/ports.tssrc/lib/inference/openrouter-runtime-adapter.test.tssrc/lib/inference/openrouter-runtime-adapter.tssrc/lib/inference/openrouter.tssrc/lib/onboard.tssrc/lib/onboard/gateway-recovery.tssrc/lib/onboard/inference-providers/remote-openai-surface.test.tssrc/lib/onboard/inference-providers/remote.tssrc/lib/onboard/inference-providers/types.tssrc/lib/onboard/openrouter-runtime.tssrc/lib/onboard/providers.test.tssrc/lib/onboard/setup-inference.tstest/onboard-openrouter-inference.test.ts
✅ Files skipped from review due to trivial changes (2)
- docs/reference/platform-support.mdx
- ci/platform-matrix.json
🚧 Files skipped from review as they are similar to previous changes (3)
- src/lib/onboard/providers.test.ts
- docs/inference/inference-options.mdx
- src/lib/onboard.ts
Signed-off-by: San Dang <sdang@nvidia.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/inference/openrouter-runtime-adapter.test.ts (1)
1-192: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winLink the retirement issue/PR for this temporary adapter The exit criteria are already in the TODO, but the migration tracker link is still missing from
src/lib/inference/openrouter-runtime-adapter.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/inference/openrouter-runtime-adapter.test.ts` around lines 1 - 192, The temporary adapter TODO is missing the migration tracker reference, so update the TODO comment in openrouter-runtime-adapter.ts to include the retirement issue/PR link alongside the existing exit criteria. Locate the adapter setup around createOpenRouterRuntimeAdapterServer and the related health/runtime comments, then add the tracker URL without changing behavior or test expectations.Source: Path instructions
🧹 Nitpick comments (1)
src/lib/inference/openrouter-runtime-adapter.test.ts (1)
155-176: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winMissing
x-openrouter-titleassertion for models passthrough.The chat-completions test verifies both
http-refererandx-openrouter-titleattribution headers are forwarded, but this models-endpoint test only checksauthorizationandhttp-referer(Lines 173-174). Since the PR objective requires both attribution headers on all API requests, consider assertingx-openrouter-titlehere too for consistent coverage.🧪 Suggested addition
expect(upstream.captured[0].headers.authorization).toBe(OPENROUTER_TEST_AUTHORIZATION); expect(upstream.captured[0].headers["http-referer"]).toBe("https://www.nvidia.com/nemoclaw/"); + expect(upstream.captured[0].headers["x-openrouter-title"]).toBe("NVIDIA NemoClaw"); });🤖 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/inference/openrouter-runtime-adapter.test.ts` around lines 155 - 176, The models passthrough test in openrouter-runtime-adapter is missing coverage for the attribution header forwarding expected on all requests. Update the test around createOpenRouterRuntimeAdapterServer, fetch, and upstream.captured assertions to also verify that x-openrouter-title is preserved alongside authorization and http-referer, matching the chat-completions test’s header checks.
🤖 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.
Outside diff comments:
In `@src/lib/inference/openrouter-runtime-adapter.test.ts`:
- Around line 1-192: The temporary adapter TODO is missing the migration tracker
reference, so update the TODO comment in openrouter-runtime-adapter.ts to
include the retirement issue/PR link alongside the existing exit criteria.
Locate the adapter setup around createOpenRouterRuntimeAdapterServer and the
related health/runtime comments, then add the tracker URL without changing
behavior or test expectations.
---
Nitpick comments:
In `@src/lib/inference/openrouter-runtime-adapter.test.ts`:
- Around line 155-176: The models passthrough test in openrouter-runtime-adapter
is missing coverage for the attribution header forwarding expected on all
requests. Update the test around createOpenRouterRuntimeAdapterServer, fetch,
and upstream.captured assertions to also verify that x-openrouter-title is
preserved alongside authorization and http-referer, matching the
chat-completions test’s header checks.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 5fb40271-9e66-43af-8553-58de6842ebcd
📒 Files selected for processing (5)
ci/env-var-doc-allowlist.jsonsrc/lib/inference/openrouter-runtime-adapter.test.tssrc/lib/inference/openrouter-runtime-adapter.tssrc/lib/onboard/openrouter-runtime.tstest/onboard-openrouter-inference.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- test/onboard-openrouter-inference.test.ts
- ci/env-var-doc-allowlist.json
- src/lib/inference/openrouter-runtime-adapter.ts
- src/lib/onboard/openrouter-runtime.ts
<!-- markdownlint-disable MD041 --> ## Summary Removes `moonshotai/kimi-k2.6` from NVIDIA Endpoints onboarding because its Chat Completions route now returns HTTP 404 even though NVIDIA's public featured feed and authenticated `/v1/models` catalog still advertise it. This PR does not add K2.7 or another replacement; a new Kimi model can be added after its production model ID and runtime route are live. ## Changes - Remove Kimi K2.6 from the bundled NVIDIA Endpoints fallback and filter the stale live-catalog entry. - Preserve the independent Hermes Provider K2.6 choice and existing/custom-route OpenClaw compatibility. - Keep Kimi compatibility coverage hermetic while the public NVIDIA K2.6 route is unavailable. - Update onboarding and capability documentation to distinguish catalog metadata from runtime availability. - Update picker, catalog, provider-boundary, documentation, and workflow coverage for the retired choice. ## Runtime Evidence - Public featured feed: still advertises `moonshotai/kimi-k2.6`. - Authenticated `https://integrate.api.nvidia.com/v1/models`: still advertises `moonshotai/kimi-k2.6` and no other Kimi model. - Actual `moonshotai/kimi-k2.6` Chat Completions request: HTTP 404. - Exact-main Kimi job: [run 28953873907 / job 85907646487](https://github.com/NVIDIA/NemoClaw/actions/runs/28953873907/job/85907646487) failed onboarding with `Chat Completions API: HTTP 404`. - `moonshotai/kimi-k2.7-code` is absent from `/v1/models` and its candidate route also returns HTTP 404, so replacement support remains out of scope. ## 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 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: - [x] 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: ## Advisor Follow-up Rationale - **Connect reconciliation (`PRA-1` / `PRA-7`):** This PR changes future NVIDIA Endpoints choices only; it deliberately preserves existing sandbox and custom-route compatibility and does not alter reconciliation semantics. Generic model divergence is covered in `src/lib/inference/config.test.ts`, and caller-level warning plus realignment is covered in `src/lib/actions/sandbox/connect-route-lifecycle.test.ts`. - **Manual `Other...` entry (`PRA-2`):** NVIDIA `/v1/models` still advertises K2.6, so the generic catalog validator cannot truthfully reject that ID. The retired-model policy removes K2.6 from advertised and fallback choices while retaining the generic manual path. Actual Kimi availability is checked by the model-aware Chat Completions probe; the linked exact-main run demonstrates the resulting HTTP 404 before successful onboarding. - **Open PR overlap (`PRA-3`):** #6461 is still open and this head is currently mergeable against live `main`. If #6461 lands first, normal merge-order conflict resolution and exact-head revalidation apply. - **Deny-list authority (`PRA-5`):** `src/lib/inference/nvidia-featured-models.ts` already documents why repository retirement policy overrides stale catalog metadata while preserving the independent Hermes Provider catalog. - **Hermes Provider warning:** Hermes Provider is an independent, pre-existing route and model catalog that this NVIDIA Endpoints retirement intentionally leaves unchanged. The advisor identified no evidence that its K2.6 route is unavailable; adding a new provider-level runtime validation contract belongs in separate provider work. - **Numeric picker tests:** The production prompt accepts numeric menu input, so the tests intentionally exercise that user contract. Each affected test immediately asserts the exact selected model and probe target, preventing an index change from silently validating the wrong model. - **Runtime test follow-ups:** The exact-head Kimi E2E proves secret-free mock routing plus the split tool trajectory; existing health tests prove model-aware Chat Completions failures are unhealthy. The linked exact-main public run supplies the stale-catalog-success / Chat-Completions-404 negative-path evidence without adding live-secret dependency to this PR. - **Runtime follow-up:** Exact-head E2E run [28957983313](https://github.com/NVIDIA/NemoClaw/actions/runs/28957983313) passes `inference-routing`, `cloud-onboard`, and the repaired hermetic `kimi-inference-compat` lane. The public negative-path evidence remains the linked exact-main HTTP 404 run. ## 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 - [x] Targeted behavior tests pass for the current change set: 164 focused config, model-prompt, featured-catalog, docs-contract, and onboarding tests - [x] E2E workflow boundary tests pass: 17 tests - [x] Exact-head advisor-required E2E run [28957983313](https://github.com/NVIDIA/NemoClaw/actions/runs/28957983313) passes `inference-routing`, `cloud-onboard`, and `kimi-inference-compat` - [x] `npm run typecheck:cli`, `npm run source-shape:check`, `npm run test-size:check`, and `npm run validate:configs` pass - [x] Applicable broad gate passed — all exact-head required contexts and the standard matrix are green - [ ] Quality Gates section completed with required justifications or waivers — sensitive-path review remains on the normal approval path - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings — 0 errors and 2 pre-existing warnings - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) - [ ] New doc pages include SPDX header and frontmatter — no new pages --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated model availability filtering so retired/unavailable compatibility options (including Kimi K2.6) no longer appear in onboarding prompts, improving default selection reliability. * Adjusted the live compatibility testing setup and mode-dependent classification to run consistently in mock mode. * Improved mock streaming behavior so tool calls are emitted as separate `exec` calls with distinct arguments. * **Documentation** * Refreshed inference onboarding/model task-fit guidance to clarify that runtime route validation determines current availability. * Updated curated model lists and platform reference links to match the latest availability rules. * **Tests / CI** * Updated and expanded coverage to reflect the revised availability and selection behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
Follow-up on the latest Nemotron Ultra advisor comment for
All required PR checks are green after the push. |
E2E Target Results — ✅ All requested jobs passedRun: 28992839983
|
<!-- markdownlint-disable MD041 --> ## Summary Adds the pre-tag v0.0.79 release notes entry to `docs/about/release-notes.mdx` so the release plan can be generated after docs merge. The entry summarizes the merged v0.0.79 release train across inference, diagnostics, runtime hardening, policies, onboarding recovery, and release validation. ## Changes - Added the v0.0.79 release notes section with linked follow-up documentation for OpenRouter onboarding, managed vLLM changes, completion and logging, Deep Agents runtime limits, policy updates, onboarding recovery, and release validation. - Source summary: - #6461 -> `docs/about/release-notes.mdx`: Documents OpenRouter onboarding support and links to inference/provider references. - #6271 and #6272 -> `docs/about/release-notes.mdx`: Documents shell completion and structured logging highlights. - #6465, #6539, #6570, and #6528 -> `docs/about/release-notes.mdx`: Documents status route-drift, orphaned sandbox, gateway cleanup, and DGX Spark express-install diagnostics. - #6523, #6551, #6484, #6488, #6324, and #6542 -> `docs/about/release-notes.mdx`: Documents managed vLLM, Qwen3.6 tool parser, compaction, and timeout/readiness improvements. - #6559, #6538, #6560, #6568, #6552, #6567, and #6587 -> `docs/about/release-notes.mdx`: Documents runtime, credential, proxy, PID namespace, TOML, and provider-state hardening. - #6541, #5415, #6246, #6496, and #6573 -> `docs/about/release-notes.mdx`: Documents GitHub policy, Gmail policy, MCP allowlist, WhatsApp, and messaging-variant updates. - #6253, #6572, #6444, #6536, and #5860 -> `docs/about/release-notes.mdx`: Documents onboarding resume and create-step recovery improvements. - #6508, #6527, #5506, #6588, #6446, #6447, #6582, #6296, #6367, #6397, and #6505 -> `docs/about/release-notes.mdx`: Documents docs, release-risk, and E2E validation updates. ## 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 <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Release-note prose only. - [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 <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [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 — command/result or justification: Tests not applicable, release-note prose only. - [ ] 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) - [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) Docs validation note: `npm run docs:check-agent-variants && npm run docs:check-routes && git diff --check` passed. Full `npm run docs` is currently blocked before Fern validation because the pinned `fern-api@5.65.2` package is unavailable from npm (`ETARGET No matching version found`). --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.79 with a new summary of recent improvements, including onboarding and inference options, operator/CLI diagnostics, sandbox recovery hardening, runtime limits, network policy behavior, and release validation updates. * Added updated references and links for the latest release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- markdownlint-disable MD041 --> ## Summary Removes `moonshotai/kimi-k2.6` from NVIDIA Endpoints onboarding because its Chat Completions route now returns HTTP 404 even though NVIDIA's public featured feed and authenticated `/v1/models` catalog still advertise it. This PR does not add K2.7 or another replacement; a new Kimi model can be added after its production model ID and runtime route are live. ## Changes - Remove Kimi K2.6 from the bundled NVIDIA Endpoints fallback and filter the stale live-catalog entry. - Preserve the independent Hermes Provider K2.6 choice and existing/custom-route OpenClaw compatibility. - Keep Kimi compatibility coverage hermetic while the public NVIDIA K2.6 route is unavailable. - Update onboarding and capability documentation to distinguish catalog metadata from runtime availability. - Update picker, catalog, provider-boundary, documentation, and workflow coverage for the retired choice. ## Runtime Evidence - Public featured feed: still advertises `moonshotai/kimi-k2.6`. - Authenticated `https://integrate.api.nvidia.com/v1/models`: still advertises `moonshotai/kimi-k2.6` and no other Kimi model. - Actual `moonshotai/kimi-k2.6` Chat Completions request: HTTP 404. - Exact-main Kimi job: [run 28953873907 / job 85907646487](https://github.com/NVIDIA/NemoClaw/actions/runs/28953873907/job/85907646487) failed onboarding with `Chat Completions API: HTTP 404`. - `moonshotai/kimi-k2.7-code` is absent from `/v1/models` and its candidate route also returns HTTP 404, so replacement support remains out of scope. ## 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 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: - [x] 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: ## Advisor Follow-up Rationale - **Connect reconciliation (`PRA-1` / `PRA-7`):** This PR changes future NVIDIA Endpoints choices only; it deliberately preserves existing sandbox and custom-route compatibility and does not alter reconciliation semantics. Generic model divergence is covered in `src/lib/inference/config.test.ts`, and caller-level warning plus realignment is covered in `src/lib/actions/sandbox/connect-route-lifecycle.test.ts`. - **Manual `Other...` entry (`PRA-2`):** NVIDIA `/v1/models` still advertises K2.6, so the generic catalog validator cannot truthfully reject that ID. The retired-model policy removes K2.6 from advertised and fallback choices while retaining the generic manual path. Actual Kimi availability is checked by the model-aware Chat Completions probe; the linked exact-main run demonstrates the resulting HTTP 404 before successful onboarding. - **Open PR overlap (`PRA-3`):** NVIDIA#6461 is still open and this head is currently mergeable against live `main`. If NVIDIA#6461 lands first, normal merge-order conflict resolution and exact-head revalidation apply. - **Deny-list authority (`PRA-5`):** `src/lib/inference/nvidia-featured-models.ts` already documents why repository retirement policy overrides stale catalog metadata while preserving the independent Hermes Provider catalog. - **Hermes Provider warning:** Hermes Provider is an independent, pre-existing route and model catalog that this NVIDIA Endpoints retirement intentionally leaves unchanged. The advisor identified no evidence that its K2.6 route is unavailable; adding a new provider-level runtime validation contract belongs in separate provider work. - **Numeric picker tests:** The production prompt accepts numeric menu input, so the tests intentionally exercise that user contract. Each affected test immediately asserts the exact selected model and probe target, preventing an index change from silently validating the wrong model. - **Runtime test follow-ups:** The exact-head Kimi E2E proves secret-free mock routing plus the split tool trajectory; existing health tests prove model-aware Chat Completions failures are unhealthy. The linked exact-main public run supplies the stale-catalog-success / Chat-Completions-404 negative-path evidence without adding live-secret dependency to this PR. - **Runtime follow-up:** Exact-head E2E run [28957983313](https://github.com/NVIDIA/NemoClaw/actions/runs/28957983313) passes `inference-routing`, `cloud-onboard`, and the repaired hermetic `kimi-inference-compat` lane. The public negative-path evidence remains the linked exact-main HTTP 404 run. ## 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 - [x] Targeted behavior tests pass for the current change set: 164 focused config, model-prompt, featured-catalog, docs-contract, and onboarding tests - [x] E2E workflow boundary tests pass: 17 tests - [x] Exact-head advisor-required E2E run [28957983313](https://github.com/NVIDIA/NemoClaw/actions/runs/28957983313) passes `inference-routing`, `cloud-onboard`, and `kimi-inference-compat` - [x] `npm run typecheck:cli`, `npm run source-shape:check`, `npm run test-size:check`, and `npm run validate:configs` pass - [x] Applicable broad gate passed — all exact-head required contexts and the standard matrix are green - [ ] Quality Gates section completed with required justifications or waivers — sensitive-path review remains on the normal approval path - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings — 0 errors and 2 pre-existing warnings - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) - [ ] New doc pages include SPDX header and frontmatter — no new pages --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated model availability filtering so retired/unavailable compatibility options (including Kimi K2.6) no longer appear in onboarding prompts, improving default selection reliability. * Adjusted the live compatibility testing setup and mode-dependent classification to run consistently in mock mode. * Improved mock streaming behavior so tool calls are emitted as separate `exec` calls with distinct arguments. * **Documentation** * Refreshed inference onboarding/model task-fit guidance to clarify that runtime route validation determines current availability. * Updated curated model lists and platform reference links to match the latest availability rules. * **Tests / CI** * Updated and expanded coverage to reflect the revised availability and selection behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Adds first-class OpenRouter onboarding support for OpenClaw, Hermes, and LangChain Deep Agents Code. OpenRouter is exposed as its own provider choice while configuring OpenShell through the OpenAI-compatible runtime path with the OpenRouter base URL and credential environment. This PR is a partial implementation of NVIDIA#5826. OpenRouter attribution headers are applied to onboarding health checks, catalog probes, and model-validation probes only. Runtime sandbox traffic still uses OpenShell's `openai` provider profile with `OPENAI_BASE_URL=https://openrouter.ai/api/v1`; runtime extra outbound headers remain unsupported until OpenShell provides native/static-header support. ## Related Issue Partially addresses NVIDIA#5826. ## Changes - Adds OpenRouter provider/menu/config handling, including `OPENROUTER_API_KEY`, `openrouter-api`, and `https://openrouter.ai/api/v1`. - Loads a temporary OpenRouter catalog through the featured-model catalog mechanism and applies OpenRouter-specific host-side validation headers for catalog/model probes and onboarding health checks. - Updates inference validation, credential redaction/scanning allowlists, provider reuse, setup flow, and docs/platform tables for OpenRouter. - Adds focused CLI and integration coverage for OpenRouter onboarding and keeps legacy test files within the size budget. ## 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: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: self-reviewed credential handling; OpenRouter secrets are passed via environment, redacted/scanned, and covered by targeted tests. Runtime OpenRouter extra headers are intentionally unsupported in this PR outside onboarding health checks and validation probes. - [ ] 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 — command/result or justification: `npx vitest run --project integration test/onboard-openrouter-inference.test.ts`; `npx vitest run --project cli src/lib/onboard/providers.test.ts src/lib/onboard/inference-providers/remote-openai-surface.test.ts src/lib/core/ports.test.ts`; `npm run typecheck:cli`; `npm run docs`; `git diff --cached --check`. - [ ] 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) — `npm run docs` passed; Fern reported 2 existing 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: San Dang <sdang@nvidia.com> --------- Signed-off-by: San Dang <sdang@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Adds the pre-tag v0.0.79 release notes entry to `docs/about/release-notes.mdx` so the release plan can be generated after docs merge. The entry summarizes the merged v0.0.79 release train across inference, diagnostics, runtime hardening, policies, onboarding recovery, and release validation. ## Changes - Added the v0.0.79 release notes section with linked follow-up documentation for OpenRouter onboarding, managed vLLM changes, completion and logging, Deep Agents runtime limits, policy updates, onboarding recovery, and release validation. - Source summary: - NVIDIA#6461 -> `docs/about/release-notes.mdx`: Documents OpenRouter onboarding support and links to inference/provider references. - NVIDIA#6271 and NVIDIA#6272 -> `docs/about/release-notes.mdx`: Documents shell completion and structured logging highlights. - NVIDIA#6465, NVIDIA#6539, NVIDIA#6570, and NVIDIA#6528 -> `docs/about/release-notes.mdx`: Documents status route-drift, orphaned sandbox, gateway cleanup, and DGX Spark express-install diagnostics. - NVIDIA#6523, NVIDIA#6551, NVIDIA#6484, NVIDIA#6488, NVIDIA#6324, and NVIDIA#6542 -> `docs/about/release-notes.mdx`: Documents managed vLLM, Qwen3.6 tool parser, compaction, and timeout/readiness improvements. - NVIDIA#6559, NVIDIA#6538, NVIDIA#6560, NVIDIA#6568, NVIDIA#6552, NVIDIA#6567, and NVIDIA#6587 -> `docs/about/release-notes.mdx`: Documents runtime, credential, proxy, PID namespace, TOML, and provider-state hardening. - NVIDIA#6541, NVIDIA#5415, NVIDIA#6246, NVIDIA#6496, and NVIDIA#6573 -> `docs/about/release-notes.mdx`: Documents GitHub policy, Gmail policy, MCP allowlist, WhatsApp, and messaging-variant updates. - NVIDIA#6253, NVIDIA#6572, NVIDIA#6444, NVIDIA#6536, and NVIDIA#5860 -> `docs/about/release-notes.mdx`: Documents onboarding resume and create-step recovery improvements. - NVIDIA#6508, NVIDIA#6527, NVIDIA#5506, NVIDIA#6588, NVIDIA#6446, NVIDIA#6447, NVIDIA#6582, NVIDIA#6296, NVIDIA#6367, NVIDIA#6397, and NVIDIA#6505 -> `docs/about/release-notes.mdx`: Documents docs, release-risk, and E2E validation updates. ## 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 <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Release-note prose only. - [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 <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [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 — command/result or justification: Tests not applicable, release-note prose only. - [ ] 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) - [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) Docs validation note: `npm run docs:check-agent-variants && npm run docs:check-routes && git diff --check` passed. Full `npm run docs` is currently blocked before Fern validation because the pinned `fern-api@5.65.2` package is unavailable from npm (`ETARGET No matching version found`). --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.79 with a new summary of recent improvements, including onboarding and inference options, operator/CLI diagnostics, sandbox recovery hardening, runtime limits, network policy behavior, and release validation updates. * Added updated references and links for the latest release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Adds first-class OpenRouter onboarding support for OpenClaw, Hermes, and LangChain Deep Agents Code. OpenRouter is exposed as its own provider choice while configuring OpenShell through the OpenAI-compatible runtime path with the OpenRouter base URL and credential environment.
This PR is a partial implementation of #5826. OpenRouter attribution headers are applied to onboarding health checks, catalog probes, and model-validation probes only. Runtime sandbox traffic still uses OpenShell's
openaiprovider profile withOPENAI_BASE_URL=https://openrouter.ai/api/v1; runtime extra outbound headers remain unsupported until OpenShell provides native/static-header support.Related Issue
Partially addresses #5826.
Changes
OPENROUTER_API_KEY,openrouter-api, andhttps://openrouter.ai/api/v1.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project integration test/onboard-openrouter-inference.test.ts;npx vitest run --project cli src/lib/onboard/providers.test.ts src/lib/onboard/inference-providers/remote-openai-surface.test.ts src/lib/core/ports.test.ts;npm run typecheck:cli;npm run docs;git diff --cached --check.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) —npm run docspassed; Fern reported 2 existing warnings.Signed-off-by: San Dang sdang@nvidia.com