Repository navigation
fix: refresh NVIDIA Endpoints featured models - #6074
apurvvkumaria merged 9 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR replaces the static NVIDIA Endpoints model list with a live featured-model catalog, adds curated fallback handling, updates prompt default handling, and routes onboarding model selection through a session-scoped selector. Docs and tests were updated to match the new catalog and menu flow. ChangesNVIDIA featured models catalog
Prompt defaults and onboarding wiring
Estimated code review effort: 4 (Complex) | ~50 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d1d84a4 to
7708662
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
src/lib/onboard.ts (1)
3778-3788: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winNo progress feedback for the new blocking catalog fetch.
getNvidiaFeaturedModelOptions()performs a synchronous curl call (up to ~5s connect + 15s max-time on failure) before the cloud-model menu renders. Previously this menu was instant (in-memory array). On a slow/unreachable network, the CLI will appear to hang with no message. Consider printing a short status line before the call.💡 Suggested fix
const _envModel = (process.env.NEMOCLAW_MODEL || "").trim(); + if (!isNonInteractive()) { + console.log(" Checking NVIDIA's featured model catalog..."); + } state.model = requestedModel || (recoveredFromSandbox && recoveredModel) || (isNonInteractive() ? DEFAULT_CLOUD_MODEL : await promptCloudModel({🤖 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.ts` around lines 3778 - 3788, The blocking catalog fetch introduced by getNvidiaFeaturedModelOptions() can make the cloud-model prompt appear frozen with no feedback; add a short status message before promptCloudModel() is called in onboard.ts so users see that model options are being loaded. Keep the message around the state.model assignment flow, and ensure it prints before the synchronous fetch starts, then proceeds into promptCloudModel() once options are ready.src/lib/inference/provider-models.ts (1)
151-159: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winSilent fallback hides catalog fetch failures from the user.
When the live catalog fetch fails (network error, HTTP error, malformed response),
getNvidiaFeaturedModelOptionsfalls back toCLOUD_MODEL_OPTIONSwith no indication to the caller/user.result.message/httpStatusare computed infetchNvidiaFeaturedModelsbut discarded here. The sibling Hermes-provider-model fetch inonboard.ts(nousModels.getHermesProviderModelOptions()) logs aconsole.warnon failure before falling back — this path doesn't follow that established pattern, so users have no way to know they're seeing a stale/curated list instead of the live featured catalog.♻️ Suggested fix
export function getNvidiaFeaturedModelOptions( options: ProviderModelOptions = {}, ): FeaturedModelOption[] { const result = fetchNvidiaFeaturedModels(options); - return result.ok && result.models.length > 0 ? result.models : CLOUD_MODEL_OPTIONS; + if (result.ok && result.models.length > 0) { + return result.models; + } + if (!result.ok) { + console.warn( + ` Warning: failed to load NVIDIA's featured model catalog; falling back to the bundled list (${result.message}).`, + ); + } + return CLOUD_MODEL_OPTIONS; }🤖 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/provider-models.ts` around lines 151 - 159, getNvidiaFeaturedModelOptions currently falls back to CLOUD_MODEL_OPTIONS silently when fetchNvidiaFeaturedModels fails or returns no models, hiding live catalog errors from callers. Update getNvidiaFeaturedModelOptions to surface the failure before returning the curated fallback, using the existing result.message and result.httpStatus from fetchNvidiaFeaturedModels; follow the pattern used by nousModels.getHermesProviderModelOptions() in onboard.ts by logging a warning with the failure details and then returning CLOUD_MODEL_OPTIONS only after notifying the user.src/lib/inference/provider-models.test.ts (1)
9-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winGood coverage for the happy paths; consider covering the error/empty branches too.
No test exercises
fetchNvidiaFeaturedModels's catch path (e.g. malformed JSON or a response missing"featured-models") orgetNvidiaFeaturedModelOptions's fallback when the fetch succeeds but returns zero usable models. Both are real branches in the implementation that handle untrusted external data.Also applies to: 20-88
🤖 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/provider-models.test.ts` around lines 9 - 18, Add test coverage for the error and empty-data branches in provider-models.test.ts. Specifically, exercise fetchNvidiaFeaturedModels by simulating malformed JSON and a response missing "featured-models" so the catch path is covered, and add a case for getNvidiaFeaturedModelOptions where the fetch succeeds but parseNvidiaFeaturedModels yields no usable models so the fallback path is asserted. Use the existing symbols fetchNvidiaFeaturedModels, parseNvidiaFeaturedModels, and getNvidiaFeaturedModelOptions to locate the relevant tests.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 `@docs/inference/inference-options.mdx`:
- Line 69: The NVIDIA fallback entry is still wired to the old Minimax M2.7
model ID in both the shared inference config and the generated docs table.
Update the Minimax model identifier in src/lib/inference/config.ts (the NVIDIA
fallback source list) to the intended Minimax M3 ID, then regenerate
docs/inference/inference-options.mdx so the table stays in sync with the shared
source of truth.
In `@src/lib/inference/config.ts`:
- Around line 57-60: Update the Minimax featured model entry in config so it
uses the Minimax M3 model id and label instead of the stale
minimaxai/minimax-m2.7 value. Make the same replacement anywhere that still
depends on the old Minimax fallback, including the assertions in config.test.ts
and provider-models.test.ts and the fallback logic in
getNvidiaFeaturedModelOptions, so the config and tests stay aligned.
---
Nitpick comments:
In `@src/lib/inference/provider-models.test.ts`:
- Around line 9-18: Add test coverage for the error and empty-data branches in
provider-models.test.ts. Specifically, exercise fetchNvidiaFeaturedModels by
simulating malformed JSON and a response missing "featured-models" so the catch
path is covered, and add a case for getNvidiaFeaturedModelOptions where the
fetch succeeds but parseNvidiaFeaturedModels yields no usable models so the
fallback path is asserted. Use the existing symbols fetchNvidiaFeaturedModels,
parseNvidiaFeaturedModels, and getNvidiaFeaturedModelOptions to locate the
relevant tests.
In `@src/lib/inference/provider-models.ts`:
- Around line 151-159: getNvidiaFeaturedModelOptions currently falls back to
CLOUD_MODEL_OPTIONS silently when fetchNvidiaFeaturedModels fails or returns no
models, hiding live catalog errors from callers. Update
getNvidiaFeaturedModelOptions to surface the failure before returning the
curated fallback, using the existing result.message and result.httpStatus from
fetchNvidiaFeaturedModels; follow the pattern used by
nousModels.getHermesProviderModelOptions() in onboard.ts by logging a warning
with the failure details and then returning CLOUD_MODEL_OPTIONS only after
notifying the user.
In `@src/lib/onboard.ts`:
- Around line 3778-3788: The blocking catalog fetch introduced by
getNvidiaFeaturedModelOptions() can make the cloud-model prompt appear frozen
with no feedback; add a short status message before promptCloudModel() is called
in onboard.ts so users see that model options are being loaded. Keep the message
around the state.model assignment flow, and ensure it prints before the
synchronous fetch starts, then proceeds into promptCloudModel() once options are
ready.
🪄 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: 5d0aa41f-0c2d-4644-bd35-715785a3a8e0
📒 Files selected for processing (9)
ci/test-file-size-budget.jsondocs/inference/inference-options.mdxsrc/lib/inference/config.test.tssrc/lib/inference/config.tssrc/lib/inference/model-prompts.test.tssrc/lib/inference/provider-models.test.tssrc/lib/inference/provider-models.tssrc/lib/onboard.tstest/onboard-selection.test.ts
7708662 to
bdf31e3
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/onboard.ts (1)
3777-3784: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winCache the featured-model catalog across onboarding retries.
getNvidiaFeaturedModelOptions()runs a fresh curl probe every time the build-provider prompt is revisited, so backing out and returning to that prompt pays the network round-trip again. The probe is bounded by--connect-timeout 5 --max-time 15, but this still adds avoidable latency to the interactive flow.🤖 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.ts` around lines 3777 - 3784, Cache the featured-model catalog used by promptCloudModel so repeated onboarding retries do not re-run the curl probe each time the build-provider prompt is revisited. Update the flow around providerModels.getNvidiaFeaturedModelPromptOptions(_envModel) in src/lib/onboard.ts to fetch the Nvidia featured-model options once per onboarding session (or reuse a memoized result) and pass the cached options into promptCloudModel on subsequent visits. Keep the fallback behavior to DEFAULT_CLOUD_MODEL unchanged.
🤖 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/onboard.ts`:
- Around line 3777-3784: Cache the featured-model catalog used by
promptCloudModel so repeated onboarding retries do not re-run the curl probe
each time the build-provider prompt is revisited. Update the flow around
providerModels.getNvidiaFeaturedModelPromptOptions(_envModel) in
src/lib/onboard.ts to fetch the Nvidia featured-model options once per
onboarding session (or reuse a memoized result) and pass the cached options into
promptCloudModel on subsequent visits. Keep the fallback behavior to
DEFAULT_CLOUD_MODEL unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7d275832-1c07-45dd-96e7-2be786f2350a
📒 Files selected for processing (9)
ci/test-file-size-budget.jsondocs/inference/inference-options.mdxsrc/lib/inference/config.test.tssrc/lib/inference/config.tssrc/lib/inference/model-prompts.test.tssrc/lib/inference/provider-models.test.tssrc/lib/inference/provider-models.tssrc/lib/onboard.tstest/onboard-selection.test.ts
✅ Files skipped from review due to trivial changes (2)
- ci/test-file-size-budget.json
- docs/inference/inference-options.mdx
🚧 Files skipped from review as they are similar to previous changes (6)
- src/lib/inference/model-prompts.test.ts
- src/lib/inference/config.test.ts
- src/lib/inference/provider-models.test.ts
- src/lib/inference/config.ts
- test/onboard-selection.test.ts
- src/lib/inference/provider-models.ts
Signed-off-by: Ho Lim <[email protected]>
bdf31e3 to
ddfcc73
Compare
Signed-off-by: Carlos Villela <[email protected]>
|
@coderabbitai review\n\nCurrent-main salvage is now at |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Confirm current commit
git log -1 --format='%H %s'
echo "---"
# Show relevant provider-models.ts file
fd -a provider-models.ts
echo "=== provider-models.ts ==="
cat -n src/lib/inference/provider-models.tsLength of output: 19240 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== onboard.ts relevant section ==="
rg -n "NvidiaFeatured|getNvidiaFeatured|createNvidiaFeatured|DEFAULT_CLOUD_MODEL" src/lib/onboard.ts
echo "=== config.ts CLOUD_MODEL_OPTIONS / DEFAULT_CLOUD_MODEL ==="
rg -n "CLOUD_MODEL_OPTIONS|DEFAULT_CLOUD_MODEL" -A3 src/lib/inference/config.ts | head -80
echo "=== provider-models.test.ts ==="
cat -n src/lib/inference/provider-models.test.ts
echo "=== validation.ts isSafeModelId ==="
rg -n "isSafeModelId" -A15 src/lib/validation.ts | head -60Length of output: 23425 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== full config.ts ==="
cat -n src/lib/inference/config.ts
echo "=== search git history / PR description for GLM-5.1 retirement rationale ==="
git log --all --oneline | head -30
echo "=== search for RETIRED comment context ==="
rg -n "RETIRED_NVIDIA_FEATURED_MODEL_IDS" -B5 -A2 src/lib/inference/provider-models.ts
echo "=== onboard.ts around announce/progress ==="
sed -n '3940,3975p' src/lib/onboard.ts
echo "=== check inference-options.mdx for GLM mention ==="
rg -n "GLM" docs/inference/inference-options.mdxLength of output: 16539 🏁 Script executed: #!/bin/bash
set -euo pipefail
sed -n '3940,3975p' src/lib/onboard.ts
echo "=== GLM mentions in docs ==="
rg -n "GLM" docs/inference/inference-options.mdx || true
echo "=== onboard-selection test for progress/warning text ==="
rg -n "Warning:|Loading|fetching featured|announce" test/onboard-selection.test.ts | head -30Length of output: 2302 This looks solid. All the claims check out against the current head (
I didn't find any remaining issues in this pass — the hardening changes look correctly implemented and well-covered by tests. I'll proceed with the review. ✅ Action performedReview finished.
|
Signed-off-by: Carlos Villela <[email protected]>
|
@coderabbitai review\n\nGrowth-guard follow-up is now at |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git log -1 --format='%H %s'
echo "---"
fd -a . src/lib/onboard | head -50
echo "---"
echo "=== git diff stat for onboard.ts and onboard/ dir since previous commit ==="
git log --oneline -10 -- src/lib/onboard.ts src/lib/onboard/ | head -20
echo "---"
echo "=== onboard.ts current relevant section ==="
rg -n "NvidiaFeatured|getNvidiaFeatured|createNvidiaFeatured|DEFAULT_CLOUD_MODEL|from './onboard/" src/lib/onboard.ts
echo "=== onboard directory listing ==="
fd . src/lib/onboard -t fLength of output: 23365 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== nvidia-featured-model-selection.ts ==="
cat -n src/lib/onboard/nvidia-featured-model-selection.ts
echo "=== check for test file ==="
fd -a "nvidia-featured-model" src
echo "=== diff of onboard.ts between d179b5e1 and fde7f2dc ==="
git diff d179b5e1 fde7f2dc -- src/lib/onboard.ts | head -200
echo "=== line count of onboard.ts before/after ==="
git show d179b5e1:src/lib/onboard.ts | wc -l
git show fde7f2dc:src/lib/onboard.ts | wc -lLength of output: 6459 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== setup-nim-selection.ts relevant ==="
rg -n "nvidiaFeaturedModels|NvidiaFeaturedModelSession|createNvidiaFeaturedModelSession" src/lib/onboard/setup-nim-selection.ts
echo "=== full context around SetupNimSelectionState type ==="
rg -n "SetupNimSelectionState" -A20 src/lib/onboard/setup-nim-selection.ts | head -60
echo "=== check providerModels import still used in onboard.ts ==="
rg -n "providerModels\." src/lib/onboard.ts | head -20
echo "=== check test file coverage for nvidia-featured-model-selection ==="
rg -n "createNvidiaFeaturedModelSession|NvidiaFeaturedModelSession" src/lib/onboard --include='*.test.ts' -g '*.test.ts'
fd -a -t f ".test.ts" src/lib/onboard | xargs rg -l "createNvidiaFeaturedModelSession" 2>/dev/null
echo "=== onboard-selection.test.ts still passing structurally? check references ==="
rg -n "getNvidiaFeaturedModelPromptOptions|createNvidiaFeaturedModelSession" test/onboard-selection.test.tsLength of output: 3633 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== providerModels import statement in onboard.ts ==="
rg -n "providerModels" src/lib/onboard.ts
echo "=== check where state.nvidiaFeaturedModels is used/read across file ==="
rg -n "nvidiaFeaturedModels" src/lib/onboard.ts src/lib/onboard/setup-nim-selection.ts
echo "=== check test file for nvidia-featured-model-selection.ts directly ==="
fd -a "nvidia-featured-model-selection.test" src
echo "=== check onboard/README.md mentions module for discoverability ==="
rg -n "nvidia-featured-model-selection" src/lib/onboard/README.mdLength of output: 1665 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== full diff stat between d179b5e1 and fde7f2dc ==="
git diff --stat d179b5e1 fde7f2dc
echo "=== check any size-budget test referencing onboard.ts or line counts ==="
rg -n "size-budget|MAX_LINES|byte budget|file size" test -g '*.test.ts' | head -20Length of output: 1363
One minor, non-blocking observation: there's no standalone unit test for Nothing else stood out. I'll proceed with the review. ✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (3)
docs/inference/inference-options.mdx (2)
92-92: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMinor hyphenation nit.
"live featured model catalog" should likely be hyphenated as a compound modifier.
✏️ Proposed fix
-The live featured model catalog can include additional models. +The live-featured model catalog can include additional models.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/inference/inference-options.mdx` at line 92, Hyphenate the compound modifier in the sentence describing the featured model catalog. Update the text in the inference options doc so “live featured model catalog” reads as a hyphenated modifier, keeping the wording consistent and grammatically correct.Source: Linters/SAST tools
71-71: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse code formatting for curated model names to match the rest of the table.
Every other row lists literal model IDs in backticks (e.g.
gpt-5.4,claude-sonnet-4-6), but the NVIDIA Endpoints row uses plain display names. Consider using the actual model IDs (matching the Model Task-Fit Guide table, e.g.nvidia/nemotron-3-ultra-550b-a55b) for consistency.✏️ Proposed fix
-| NVIDIA Endpoints | Routes to models hosted on [build.nvidia.com](https://build.nvidia.com). You can also enter any model ID from the catalog. Set `NVIDIA_INFERENCE_API_KEY`. | Nemotron 3 Ultra 550B, Nemotron 3 Super 120B, Kimi K2.6, Minimax M3 | +| NVIDIA Endpoints | Routes to models hosted on [build.nvidia.com](https://build.nvidia.com). You can also enter any model ID from the catalog. Set `NVIDIA_INFERENCE_API_KEY`. | `nvidia/nemotron-3-ultra-550b-a55b`, `nvidia/nemotron-3-super-120b-a12b`, `moonshotai/kimi-k2.6`, `minimaxai/minimax-m3` |As per path instructions,
docs/**/*.{md,mdx}requires: "Usecodeformatting for commands, paths, flags, environment variables, file names, and literal 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 `@docs/inference/inference-options.mdx` at line 71, Update the NVIDIA Endpoints row in the inference options table so the curated model entries use inline code formatting like the other rows, and replace the display names with the actual literal model IDs from the Model Task-Fit Guide (for example, the entries in the NVIDIA Endpoints row near the table in inference-options.mdx). Keep the row consistent with the table’s existing pattern by using backticks for each model ID and ensuring the listed values are the exact IDs rather than friendly names.Source: Path instructions
src/lib/onboard.ts (1)
3777-3782: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPrefer
requireValueover!fornvidiaFeaturedModels.
nvidiaFeaturedModelsis typed optional (nvidiaFeaturedModels?: NvidiaFeaturedModelSessioninSetupNimSelectionState), sostate.nvidiaFeaturedModels!bypasses that safety with a non-null assertion. This file already has an established pattern for asserting required state fields with a clear error message viarequireValue(e.g.requireValue(state.credentialEnv, ...),requireValue(state.endpointUrl, ...)a few lines below). Using the same helper here keeps failure modes consistent and diagnosable if a future caller ofhandleRemoteProviderSelectionever omits this field, instead of a genericTypeError: Cannot read properties of undefined.♻️ Proposed fix
- state.model = await state.nvidiaFeaturedModels!.select( + state.model = await requireValue( + state.nvidiaFeaturedModels, + "Missing NVIDIA featured-model session for build provider", + ).select( requestedModel, recoveredFromSandbox ? recoveredModel : null, isNonInteractive(), process.env.NEMOCLAW_MODEL, );🤖 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.ts` around lines 3777 - 3782, The `handleRemoteProviderSelection` path is using a non-null assertion on the optional `nvidiaFeaturedModels` field, bypassing the existing required-state pattern. Replace `state.nvidiaFeaturedModels!` with `requireValue(state.nvidiaFeaturedModels, ...)` in `onboard.ts`, matching the nearby `requireValue(state.credentialEnv, ...)` and `requireValue(state.endpointUrl, ...)` usage so missing state fails with a clear message instead of a generic TypeError.
🤖 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 `@docs/inference/inference-options.mdx`:
- Line 92: Hyphenate the compound modifier in the sentence describing the
featured model catalog. Update the text in the inference options doc so “live
featured model catalog” reads as a hyphenated modifier, keeping the wording
consistent and grammatically correct.
- Line 71: Update the NVIDIA Endpoints row in the inference options table so the
curated model entries use inline code formatting like the other rows, and
replace the display names with the actual literal model IDs from the Model
Task-Fit Guide (for example, the entries in the NVIDIA Endpoints row near the
table in inference-options.mdx). Keep the row consistent with the table’s
existing pattern by using backticks for each model ID and ensuring the listed
values are the exact IDs rather than friendly names.
In `@src/lib/onboard.ts`:
- Around line 3777-3782: The `handleRemoteProviderSelection` path is using a
non-null assertion on the optional `nvidiaFeaturedModels` field, bypassing the
existing required-state pattern. Replace `state.nvidiaFeaturedModels!` with
`requireValue(state.nvidiaFeaturedModels, ...)` in `onboard.ts`, matching the
nearby `requireValue(state.credentialEnv, ...)` and
`requireValue(state.endpointUrl, ...)` usage so missing state fails with a clear
message instead of a generic TypeError.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0bba3bbb-21ea-4320-a2fe-aac424c6df0a
📒 Files selected for processing (10)
docs/inference/inference-options.mdxsrc/lib/inference/config.test.tssrc/lib/inference/config.tssrc/lib/inference/model-prompts.test.tssrc/lib/inference/provider-models.test.tssrc/lib/inference/provider-models.tssrc/lib/onboard.tssrc/lib/onboard/nvidia-featured-model-selection.tssrc/lib/onboard/setup-nim-selection.tstest/onboard-selection.test.ts
💤 Files with no reviewable changes (1)
- src/lib/inference/config.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/lib/inference/config.test.ts
- src/lib/inference/provider-models.test.ts
- src/lib/inference/model-prompts.test.ts
- src/lib/inference/provider-models.ts
- test/onboard-selection.test.ts
Signed-off-by: Carlos Villela <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Vitest E2E Target Results — ❌ Some jobs failedRun: 28541878267
|
Signed-off-by: Carlos Villela <[email protected]>
Signed-off-by: Carlos Villela <[email protected]>
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/inference/nvidia-featured-models.test.ts (1)
217-237: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMissing test: default retained when present in the live catalog.
The sibling case to "uses the first live model when the configured default is absent" — verifying
nvidia/nemotron-3-super-120b-a12bis kept as default when it appears in the live catalog — isn't directly asserted anywhere in this file. That's the other half of the stated PR behavior ("keeps Nemotron 3 Super as the default when present").✅ Suggested additional test
+ it("keeps the configured default when it is present in the live catalog", () => { + const options = getNvidiaFeaturedModelPromptOptions(null, { + runCurlProbeImpl: () => ({ + ok: true, + httpStatus: 200, + curlStatus: 0, + body: JSON.stringify({ + "featured-models": [ + { model: "moonshotai/kimi-k2.6", "model-name": "Kimi K2.6" }, + { + model: "nvidia/nemotron-3-super-120b-a12b", + "model-name": "Nemotron 3 Super 120B", + }, + ], + }), + stderr: "", + message: "", + }), + }); + + expect(options.defaultModelId).toBe("nvidia/nemotron-3-super-120b-a12b"); + });🤖 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/nvidia-featured-models.test.ts` around lines 217 - 237, Add a test in nvidia-featured-models.test.ts to cover the opposite of the existing absent-default case: when getNvidiaFeaturedModelPromptOptions is called with the configured default nvidia/nemotron-3-super-120b-a12b and that model is present in the live featured-models catalog, the result should keep that same value in defaultModelId. Use the existing getNvidiaFeaturedModelPromptOptions helper and mirror the current “first live model when absent” setup, but assert that the default is preserved instead of falling back to the first live model.
🤖 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/inference/nvidia-featured-models.test.ts`:
- Around line 217-237: Add a test in nvidia-featured-models.test.ts to cover the
opposite of the existing absent-default case: when
getNvidiaFeaturedModelPromptOptions is called with the configured default
nvidia/nemotron-3-super-120b-a12b and that model is present in the live
featured-models catalog, the result should keep that same value in
defaultModelId. Use the existing getNvidiaFeaturedModelPromptOptions helper and
mirror the current “first live model when absent” setup, but assert that the
default is preserved instead of falling back to the first live model.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2450654a-58ed-407d-a653-77126d0c191a
📒 Files selected for processing (6)
src/lib/inference/README.mdsrc/lib/inference/nvidia-featured-models.test.tssrc/lib/inference/nvidia-featured-models.tssrc/lib/inference/provider-models.tssrc/lib/onboard/nvidia-featured-model-selection.test.tssrc/lib/onboard/nvidia-featured-model-selection.ts
💤 Files with no reviewable changes (1)
- src/lib/inference/provider-models.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/inference/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/onboard/nvidia-featured-model-selection.ts
Signed-off-by: Carlos Villela <[email protected]>
|
@coderabbitai review\n\nExact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git log -1 --format='%H %s'
echo "---"
echo "=== diff between fde7f2dc and 255d722dd ==="
git diff fde7f2dc 255d722dd --stat
echo "=== full diff ==="
git diff fde7f2dc 255d722ddLength of output: 105812 🏁 Script executed: #!/bin/bash
set -euo pipefail
git log --oneline -5
echo "---"
git branch -a | head -20
echo "---"
gh pr view 6074 --json headRefOid,baseRefName,headRefName,commits -q '.headRefOid' 2>/dev/null || true
echo "---"
rg -n "live-catalog|default-retention|retains the effective|effective default" src/lib/inference/nvidia-featured-models.test.ts | head -30Length of output: 1173 🏁 Script executed: #!/bin/bash
set -euo pipefail
git show 255d722d --stat
echo "---"
git show 255d722dLength of output: 2102 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n "getNvidiaFeaturedModelPromptOptions" -A 25 src/lib/inference/nvidia-featured-models.ts | head -60Length of output: 1231 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n "buildNvidiaFeaturedModelPromptOptions" -B2 -A 20 src/lib/inference/nvidia-featured-models.ts | head -60Length of output: 1910 Confirmed against
This is a clean, targeted regression addition with no issues. I'll proceed with the review. ✅ Action performedReview finished.
|
Vitest E2E Target Results — ✅ All selected jobs passedRun: 28544582477
|
Vitest E2E Target Results — ✅ All requested jobs passedRun: 28544582501
|
Signed-off-by: Carlos Villela <[email protected]>
Vitest E2E Target Results —
|
| Job | Result |
|---|---|
| kimi-inference-compat |
|
@coderabbitai review\n\nExact head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git log -1 --format='%H %s'
echo "---"
git diff 255d722d 2798717a --stat
echo "=== full diff ==="
git diff 255d722d 2798717aLength of output: 6682
Everything lines up with the stated 79/79 focused test pass — the diff is tight (4 files, +83/−3) and self-contained. Nothing else stood out. I'll proceed with the review. ✅ Action performedReview finished.
|
Signed-off-by: Carlos Villela <[email protected]>
|
@coderabbitai review\n\nFinal candidate head |
Vitest E2E Target Results —
|
| Job | Result |
|---|---|
| cloud-inference | |
| cloud-onboard | |
| inference-routing | ✅ success |
| kimi-inference-compat | |
| onboard-repair | |
| onboard-resume |
Vitest E2E Target Results —
|
| Job | Result |
|---|---|
| live |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git log -1 --format='%H %s'
echo "---"
git diff 2798717a a9e56dd0 --stat
echo "=== full diff ==="
git diff 2798717a a9e56dd0Length of output: 1622
Nothing else stood out — this is a clean, accurate documentation contract for the fix. I'll proceed with the review. ✅ Action performedReview finished.
|
Vitest E2E Target Results — ✅ All selected jobs passedRun: 28546330898
|
Vitest E2E Target Results — ✅ All requested jobs passedRun: 28546330993
|
## Summary - Add the `v0.0.72` release-note section with links to the deeper docs pages for installer recovery, command diagnostics, inference, policy, and sandbox repair changes. - Document the custom preset `allowed_ips` guard for user-authored policy files. ## Related Issue None. ## Source summary - #6132 -> `docs/about/release-notes.mdx`: Summarizes installer and upgrade recovery before generic onboarding, with links to quickstart and lifecycle docs. - #6087 -> `docs/network-policy/customize-network-policy.mdx`: Documents that user-authored custom presets reject `allowed_ips` for ordinary endpoints; also summarized in release notes. - #5975 -> `docs/about/release-notes.mdx`: Summarizes safer curl-based inference probes that keep API keys out of process arguments. - #6044 -> `docs/about/release-notes.mdx`: Summarizes compact `channels status` configuration reporting. - #6096 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw EC2 metadata discovery disablement and links to security guidance. - #5980 and #5991 -> `docs/about/release-notes.mdx`: Summarizes `exec` multiline argument rejection and recovery guidance. - #6023 -> `docs/about/release-notes.mdx`: Summarizes registered-provider diagnostics for `inference set` failures. - #6074 -> `docs/about/release-notes.mdx`: Summarizes the refreshed NVIDIA Endpoints featured-model selection behavior. - #5969 -> `docs/about/release-notes.mdx`: Summarizes `credentials add` provider credential registration. - #6060 -> `docs/about/release-notes.mdx`: Summarizes mutable OpenClaw config permission restoration after `exec`. - #6134 -> `docs/about/release-notes.mdx`: Summarizes restored Tavily access for managed Python workflows. - #6089 -> `docs/about/release-notes.mdx`: Summarizes Hermes runtime version-scheme comparison during upgrade checks. - #6131 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw gateway watchdog recovery behavior. - #5976 and #5990 -> `docs/about/release-notes.mdx`: Summarizes prompt stdin EOF cancellation behavior during onboarding. - #5540 -> `docs/about/release-notes.mdx`: Summarizes clarified host-level and per-sandbox status command scope. - #5978 and #6018 -> `docs/about/release-notes.mdx`: Summarizes policy-denial log breadcrumbs in connect shells. ## Testing - `npm run docs:sync-agent-variants` - `npm run docs` - Commit hooks passed during `git commit`, including commitlint and gitleaks. - Pre-push hook passed during `git push`, including TypeScript CLI and package/tag version sync. ## Checklist - [x] Documentation updated. - [x] `npm run docs` completed with 0 errors and 1 existing Fern warning. - [x] No source code or generated build artifacts committed. Signed-off-by: Miyoung Choi <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.72 covering improved installer recovery, clearer CLI diagnostics, safer inference setup and provider switching, better credential handling, stronger policy boundaries, and more robust runtime repair behavior. * Updated network policy guidance to clarify when `allowed_ips` can be used, including a specific exception for the sandbox-to-host bridge endpoint. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- markdownlint-disable MD041 --> ## Summary Refreshes the interactive NVIDIA Endpoints model picker from NVIDIA's public featured-model catalog, with a safe bundled fallback when that catalog cannot be used. ## Related Issue Fixes NVIDIA#5827 ## Changes - Fetch and parse `featured-models.json` once per interactive onboarding session without requiring an API key, with progress feedback before the bounded request. - Normalize bare Nemotron IDs and the catalog's stale Minimax M2.7 entry, deduplicate normalized IDs, and exclude retired GLM 5.1 choices now that NVIDIA Endpoints no longer supports that model. - Define the repository authority and explicit removal/retention condition for each catalog exception, with one behavior-oriented fixture per exception. - Isolate the untrusted featured-catalog subsystem and its tests in focused modules, leaving authenticated provider validation at its baseline size. - Treat the public catalog as untrusted display input: remove terminal control/format sequences, cap body/ID/label/menu sizes, and sanitize fallback diagnostics. - Warn and use the bundled Ultra, Super, Kimi K2.6, and Minimax M3 list when the catalog is unavailable, malformed, empty, or contains no safe choices. - Keep Nemotron 3 Super as the interactive default when present; otherwise make the first live featured model the explicit default rather than silently mismatching the prompt. - Cache only the fetched catalog so retries avoid another network request while still recomputing a caller-supplied default. - Keep the catalog source fixed to NVIDIA's public HTTPS URL and directly preserve the onboarding back-navigation sentinel. - Update inference guidance and behavior-oriented unit/integration coverage. ## 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: independent review covered catalog trust boundaries, fixed-source fetching, terminal rendering, fallback/default/sentinel semantics, caching, bounds, deduplication, live-catalog behavior, exception lifetime contracts, and the final module extraction; all identified blockers were fixed and the final re-review found no remaining merge blocker. - [ ] 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] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [ ] Full `npm test` passes (broad runtime changes only) - [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) - [ ] New doc pages include SPDX header and frontmatter (new pages only) ### Evidence - 84/84 targeted inference CLI tests passed. - 26/26 provider-model tests passed after splitting the Nemotron, Minimax, and GLM exception contracts into dedicated fixtures. - The focused extraction passed 27/27 catalog/provider/session tests, the full 5,064-test CLI project, and all 70 onboarding-selection integration tests. - 72/72 onboarding and docs integration tests passed; the full 70-test onboarding selection suite exercised the live picker flow. - The live NVIDIA catalog parsed to Ultra, Super, Kimi K2.6, and Minimax M3; retired GLM 5.1 was excluded. - CLI type-check, test-size, Vitest project-overlap, title-style, Biome, diff checks, full CLI/coverage hooks, and effective-diff gitleaks passed. - `src/lib/onboard.ts` is net-neutral (9 additions/9 deletions); session-specific catalog logic lives in `src/lib/onboard/nvidia-featured-model-selection.ts`. - `provider-models.test.ts` is back to its exact 271-line baseline; `provider-models.ts` is 276 lines, and the focused featured source/test modules are 231/270 lines. - Docs build completed with 0 errors and the same 2 pre-existing warnings; generated agent variants remained current. - The signed merge commit preserves current `main` at `f6fac716`; its unrelated mainline changes do not overlap the 13-file effective PR diff. - The effective PR diff passed gitleaks separately, and the catalog source override is absent from both source and emitted declarations. - The full CLI/integration coverage commit hook and normal CLI type-checking push hook passed on the final follow-up. --- Signed-off-by: Ho Lim <[email protected]> Signed-off-by: Carlos Villela <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * NVIDIA Endpoints onboarding now loads the NVIDIA featured-model catalog once per onboarding session and reports loading progress before the model picker. * “Other/manual entry” handling now supports safer pre-filled defaults with improved acceptance/validation. * **Documentation** * Updated NVIDIA Endpoints onboarding and the Model Task-Fit Guide to reflect the new featured-catalog flow and current fallback models. * **Bug Fixes** * Improved default/Enter-to-accept behavior and ensured the curated fallback model set is used when the live catalog is unavailable, malformed, or contains unsafe/retired options. * **Tests** * Updated onboarding and model-prompt coverage to match the revised model picker ordering and fallback set. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Ho Lim <[email protected]> Signed-off-by: Carlos Villela <[email protected]> Co-authored-by: Carlos Villela <[email protected]>
## Summary - Add the `v0.0.72` release-note section with links to the deeper docs pages for installer recovery, command diagnostics, inference, policy, and sandbox repair changes. - Document the custom preset `allowed_ips` guard for user-authored policy files. ## Related Issue None. ## Source summary - NVIDIA#6132 -> `docs/about/release-notes.mdx`: Summarizes installer and upgrade recovery before generic onboarding, with links to quickstart and lifecycle docs. - NVIDIA#6087 -> `docs/network-policy/customize-network-policy.mdx`: Documents that user-authored custom presets reject `allowed_ips` for ordinary endpoints; also summarized in release notes. - NVIDIA#5975 -> `docs/about/release-notes.mdx`: Summarizes safer curl-based inference probes that keep API keys out of process arguments. - NVIDIA#6044 -> `docs/about/release-notes.mdx`: Summarizes compact `channels status` configuration reporting. - NVIDIA#6096 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw EC2 metadata discovery disablement and links to security guidance. - NVIDIA#5980 and NVIDIA#5991 -> `docs/about/release-notes.mdx`: Summarizes `exec` multiline argument rejection and recovery guidance. - NVIDIA#6023 -> `docs/about/release-notes.mdx`: Summarizes registered-provider diagnostics for `inference set` failures. - NVIDIA#6074 -> `docs/about/release-notes.mdx`: Summarizes the refreshed NVIDIA Endpoints featured-model selection behavior. - NVIDIA#5969 -> `docs/about/release-notes.mdx`: Summarizes `credentials add` provider credential registration. - NVIDIA#6060 -> `docs/about/release-notes.mdx`: Summarizes mutable OpenClaw config permission restoration after `exec`. - NVIDIA#6134 -> `docs/about/release-notes.mdx`: Summarizes restored Tavily access for managed Python workflows. - NVIDIA#6089 -> `docs/about/release-notes.mdx`: Summarizes Hermes runtime version-scheme comparison during upgrade checks. - NVIDIA#6131 -> `docs/about/release-notes.mdx`: Summarizes OpenClaw gateway watchdog recovery behavior. - NVIDIA#5976 and NVIDIA#5990 -> `docs/about/release-notes.mdx`: Summarizes prompt stdin EOF cancellation behavior during onboarding. - NVIDIA#5540 -> `docs/about/release-notes.mdx`: Summarizes clarified host-level and per-sandbox status command scope. - NVIDIA#5978 and NVIDIA#6018 -> `docs/about/release-notes.mdx`: Summarizes policy-denial log breadcrumbs in connect shells. ## Testing - `npm run docs:sync-agent-variants` - `npm run docs` - Commit hooks passed during `git commit`, including commitlint and gitleaks. - Pre-push hook passed during `git push`, including TypeScript CLI and package/tag version sync. ## Checklist - [x] Documentation updated. - [x] `npm run docs` completed with 0 errors and 1 existing Fern warning. - [x] No source code or generated build artifacts committed. Signed-off-by: Miyoung Choi <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.72 covering improved installer recovery, clearer CLI diagnostics, safer inference setup and provider switching, better credential handling, stronger policy boundaries, and more robust runtime repair behavior. * Updated network policy guidance to clarify when `allowed_ips` can be used, including a specific exception for the sandbox-to-host bridge endpoint. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Refreshes the interactive NVIDIA Endpoints model picker from NVIDIA's public featured-model catalog, with a safe bundled fallback when that catalog cannot be used.
Related Issue
Fixes #5827
Changes
featured-models.jsononce per interactive onboarding session without requiring an API key, with progress feedback before the bounded request.Type of Change
Quality Gates
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Evidence
src/lib/onboard.tsis net-neutral (9 additions/9 deletions); session-specific catalog logic lives insrc/lib/onboard/nvidia-featured-model-selection.ts.provider-models.test.tsis back to its exact 271-line baseline;provider-models.tsis 276 lines, and the focused featured source/test modules are 231/270 lines.mainatf6fac716; its unrelated mainline changes do not overlap the 13-file effective PR diff.Signed-off-by: Ho Lim [email protected]
Signed-off-by: Carlos Villela [email protected]
Summary by CodeRabbit