Skip to content

fix: refresh NVIDIA Endpoints featured models - #6074

Merged
apurvvkumaria merged 9 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-5827-nvidia-endpoints-model-list
Jul 1, 2026
Merged

apurvvkumaria merged 9 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-5827-nvidia-endpoints-model-list

Conversation

@HOYALIM

@HOYALIM HOYALIM commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

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

  • 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)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • 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: 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

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior
  • Full npm test passes (broad runtime changes only)
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide
  • 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]

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.

Copilot AI review requested due to automatic review settings June 30, 2026 23:44
@copy-pr-bot

copy-pr-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 386a1386-e416-47e3-8447-467c152eb767

📥 Commits

Reviewing files that changed from the base of the PR and between 2798717 and a9e56dd.

📒 Files selected for processing (1)
  • docs/inference/inference-options.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/inference/inference-options.mdx

📝 Walkthrough

Walkthrough

This 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.

Changes

NVIDIA featured models catalog

Layer / File(s) Summary
Curated cloud model list and docs
src/lib/inference/config.ts, src/lib/inference/config.test.ts, docs/inference/inference-options.mdx
Reorders CLOUD_MODEL_OPTIONS, updates the default-model assertions, and revises NVIDIA Endpoints docs for the live catalog and fallback set.
Featured-model catalog fetch and fallback
src/lib/inference/nvidia-featured-models.ts, src/lib/inference/README.md, src/lib/inference/provider-models.ts, src/lib/inference/nvidia-featured-models.test.ts
Adds live featured-model catalog parsing, sanitization, fetch/error handling, fallback behavior, prompt-option loading, module placement docs, helper comments, and coverage for parsing, fetch outcomes, fallback behavior, and loader caching.

Prompt defaults and onboarding wiring

Layer / File(s) Summary
Prompt defaults and manual-entry handling
src/lib/inference/model-prompts.ts, src/lib/inference/model-prompts.test.ts, src/lib/onboard/nvidia-featured-model-selection.ts, src/lib/onboard/nvidia-featured-model-selection.test.ts
Adds a separate manual-entry default field, updates prompt selection to honor curated versus manual defaults, and verifies the NVIDIA featured-model session behavior.
Onboarding session wiring
src/lib/onboard/setup-nim-selection.ts, src/lib/onboard.ts, test/onboard-selection.test.ts
Introduces the session-scoped featured-model selector, stores it in setup state, routes remote-provider selection through that session, and updates the onboarding scenario tests to match the revised menu flow.

Estimated code review effort: 4 (Complex) | ~50 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4769: Also updates the curated NVIDIA Endpoints cloud-model options and related expectations around nvidia/nemotron-3-ultra-550b-a55b.

Suggested labels: area: docs, provider: nvidia

Suggested reviewers: cv, ericksoa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: refreshing NVIDIA Endpoints featured models.
Linked Issues check ✅ Passed The PR replaces the manual NVIDIA Endpoints list with the public featured-models source and updates the requested model coverage.
Out of Scope Changes check ✅ Passed The changes stay focused on NVIDIA Endpoints model sourcing, onboarding behavior, docs, and tests with no clear unrelated additions.
Docstring Coverage ✅ Passed Docstring coverage is 93.75% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@HOYALIM
HOYALIM force-pushed the codex/issue-5827-nvidia-endpoints-model-list branch from d1d84a4 to 7708662 Compare June 30, 2026 23:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
src/lib/onboard.ts (1)

3778-3788: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

No 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 win

Silent fallback hides catalog fetch failures from the user.

When the live catalog fetch fails (network error, HTTP error, malformed response), getNvidiaFeaturedModelOptions falls back to CLOUD_MODEL_OPTIONS with no indication to the caller/user. result.message/httpStatus are computed in fetchNvidiaFeaturedModels but discarded here. The sibling Hermes-provider-model fetch in onboard.ts (nousModels.getHermesProviderModelOptions()) logs a console.warn on 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 win

Good 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") or getNvidiaFeaturedModelOptions'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

📥 Commits

Reviewing files that changed from the base of the PR and between e4b9111 and d1d84a4.

📒 Files selected for processing (9)
  • ci/test-file-size-budget.json
  • docs/inference/inference-options.mdx
  • src/lib/inference/config.test.ts
  • src/lib/inference/config.ts
  • src/lib/inference/model-prompts.test.ts
  • src/lib/inference/provider-models.test.ts
  • src/lib/inference/provider-models.ts
  • src/lib/onboard.ts
  • test/onboard-selection.test.ts

Comment thread docs/inference/inference-options.mdx Resolved
Comment thread src/lib/inference/config.ts Resolved
@HOYALIM
HOYALIM force-pushed the codex/issue-5827-nvidia-endpoints-model-list branch from 7708662 to bdf31e3 Compare June 30, 2026 23:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/lib/onboard.ts (1)

3777-3784: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Cache 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

📥 Commits

Reviewing files that changed from the base of the PR and between d1d84a4 and 7708662.

📒 Files selected for processing (9)
  • ci/test-file-size-budget.json
  • docs/inference/inference-options.mdx
  • src/lib/inference/config.test.ts
  • src/lib/inference/config.ts
  • src/lib/inference/model-prompts.test.ts
  • src/lib/inference/provider-models.test.ts
  • src/lib/inference/provider-models.ts
  • src/lib/onboard.ts
  • test/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

@HOYALIM
HOYALIM force-pushed the codex/issue-5827-nvidia-endpoints-model-list branch from bdf31e3 to ddfcc73 Compare July 1, 2026 00:09
@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review\n\nCurrent-main salvage is now at d179b5e10210e3e7e1726e17690770976905bfd8. Prior feedback is addressed: progress and warnings are visible, the catalog is fetched once per onboarding session, malformed/empty/unsafe results fall back, retired GLM 5.1 is excluded, terminal text and sizes are bounded, missing-default behavior is explicit, and adversarial plus live-catalog tests pass. Please review the current head.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
🧩 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.ts

Length 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 -60

Length 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.mdx

Length 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 -30

Length of output: 2302


This looks solid. All the claims check out against the current head (d179b5e1):

  • Progress/warnings visible: onboard.ts prints " Loading NVIDIA's featured model catalog..." before the first fetch, and getNvidiaFeaturedModelOptions emits a sanitized Warning: via the injectable warn callback on any failure path — both covered by tests (test/onboard-selection.test.ts Line 609, provider-models.test.ts).
  • Fetched once per session: createNvidiaFeaturedModelPromptOptionsLoader caches the resolved model list (cachedModels ??= ...) while still recomputing the effective default per call — verified directly by the "reuses one featured catalog lookup but recomputes defaults across onboarding retries" test, which asserts probeCount === 1.
  • Malformed/empty/unsafe results fall back: parseNvidiaFeaturedModels rejects oversized bodies (>1 MiB), enforces MAX_NVIDIA_FEATURED_MODELS/ID/label length caps, strips ANSI/control chars, and filters through isSafeModelId; getNvidiaFeaturedModelOptions falls back to CLOUD_MODEL_OPTIONS whenever the result isn't ok or yields zero safe models — all exercised by dedicated tests.
  • Retired GLM 5.1 excluded: RETIRED_NVIDIA_FEATURED_MODEL_IDS explicitly filters z-ai/glm-5.1, consistent with the earlier standalone fix 96aacaad ("retire GLM 5.1 endpoint selection", #6069) that this PR builds on — and the fallback CLOUD_MODEL_OPTIONS/docs no longer reference GLM at all, so there's no inconsistency with the PR's original "use GLM 5.1" ask (that model was subsequently retired upstream).
  • Terminal text/size bounds: sanitizeFeaturedCatalogText combined with ANSI_ESCAPE_RE/UNSAFE_TERMINAL_TEXT_RE strips escape sequences and bidi/control characters from both labels and fallback warning messages, with length caps enforced — confirmed by the "sanitizes untrusted catalog labels" and "removes terminal controls from featured catalog fallback warnings" tests.
  • Missing-default behavior explicit: buildNvidiaFeaturedModelPromptOptions falls back to DEFAULT_CLOUD_MODEL, then to the first live option if that default isn't present in the fetched list — covered by the "uses the first live model when the configured default is absent" test.
  • Adversarial + live-catalog tests pass: provider-models.test.ts includes oversized-catalog, spoofed-ANSI-label, malformed JSON, missing-array, unsafe-model-id, and probe-throw cases, all passing per the reviewed test file.

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 performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review\n\nGrowth-guard follow-up is now at fde7f2dcd: the top-level src/lib/onboard.ts is net-neutral, and the session-specific catalog selection logic has moved under src/lib/onboard/. This is a behavior-preserving extraction; the targeted onboarding, inference, docs, typecheck, and full CLI/coverage hooks remain green.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
🧩 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 f

Length 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 -l

Length 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.ts

Length 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.md

Length 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 -20

Length of output: 1363


@cv Verified against fde7f2dc. The extraction checks out:

  • Net-neutral top-level file: src/lib/onboard.ts shrank by 27 lines (5452 → 5425), with the removed inline loader/announce logic and parameter-threading (getNvidiaFeaturedModelPromptOptions) replaced by a single state.nvidiaFeaturedModels!.select(...) call. Overall diff is tight: +52/−38 across three files.
  • Behavior preserved: The new src/lib/onboard/nvidia-featured-model-selection.ts (createNvidiaFeaturedModelSession) reproduces the exact same precedence chain that was previously inlined — requestedModel → recoveredModel (only when recovered from sandbox) → non-interactive default (DEFAULT_CLOUD_MODEL) → one-time "Loading NVIDIA's featured model catalog..." announcement → promptCloudModel → fallback to DEFAULT_CLOUD_MODEL if the prompt returns nothing.
  • Wiring: setup-nim-selection.ts re-exports the factory and adds nvidiaFeaturedModels?: NvidiaFeaturedModelSession to SetupNimSelectionState; onboard.ts constructs the session once per setupNim call and passes it through state rather than as a threaded prompt-options callback — consistent with the "fetched once per onboarding session" property confirmed earlier.
  • No dead imports: providerModels is still used in onboard.ts for validateAnthropicModel/validateOpenAiLikeModel, so nothing was left dangling by the extraction.

One minor, non-blocking observation: there's no standalone unit test for nvidia-featured-model-selection.ts yet — its behavior is currently exercised only indirectly through test/onboard-selection.test.ts's end-to-end flows. Since the logic is small and mirrors what was already tested inline, this isn't a blocker, but a focused unit test (covering the requested/recovered/non-interactive/announce-once branches) would make regressions in this module easier to catch in isolation going forward.

Nothing else stood out. I'll proceed with the review.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
docs/inference/inference-options.mdx (2)

92-92: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Minor 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 win

Use 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: "Use code formatting 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 win

Prefer requireValue over ! for nvidiaFeaturedModels.

nvidiaFeaturedModels is typed optional (nvidiaFeaturedModels?: NvidiaFeaturedModelSession in SetupNimSelectionState), so state.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 via requireValue (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 of handleRemoteProviderSelection ever omits this field, instead of a generic TypeError: 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

📥 Commits

Reviewing files that changed from the base of the PR and between ddfcc73 and fde7f2d.

📒 Files selected for processing (10)
  • docs/inference/inference-options.mdx
  • src/lib/inference/config.test.ts
  • src/lib/inference/config.ts
  • src/lib/inference/model-prompts.test.ts
  • src/lib/inference/provider-models.test.ts
  • src/lib/inference/provider-models.ts
  • src/lib/onboard.ts
  • src/lib/onboard/nvidia-featured-model-selection.ts
  • src/lib/onboard/setup-nim-selection.ts
  • test/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

@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ❌ Some jobs failed

Run: 28541878267
Workflow ref: codex/pr6074-e2e
Requested targets: (selector rejected by workflow validation)
Requested jobs: (selector rejected by workflow validation)
Summary: 0 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
generate-matrix ❌ failure

Failed jobs: generate-matrix. Check run artifacts for logs.

@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/lib/inference/nvidia-featured-models.test.ts (1)

217-237: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing 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-a12b is 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

📥 Commits

Reviewing files that changed from the base of the PR and between b174468 and ea69d80.

📒 Files selected for processing (6)
  • src/lib/inference/README.md
  • src/lib/inference/nvidia-featured-models.test.ts
  • src/lib/inference/nvidia-featured-models.ts
  • src/lib/inference/provider-models.ts
  • src/lib/onboard/nvidia-featured-model-selection.test.ts
  • src/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

@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review\n\nExact head 255d722dd adds the requested live-catalog default-retention regression only. The focused inference suite passes 76/76, full commit hooks pass, and pre-push CLI typecheck passes.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
🧩 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 255d722dd

Length 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 -30

Length of output: 1173


🏁 Script executed:

#!/bin/bash
set -euo pipefail

git show 255d722d --stat
echo "---"
git show 255d722d

Length of output: 2102


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "getNvidiaFeaturedModelPromptOptions" -A 25 src/lib/inference/nvidia-featured-models.ts | head -60

Length of output: 1231


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "buildNvidiaFeaturedModelPromptOptions" -B2 -A 20 src/lib/inference/nvidia-featured-models.ts | head -60

Length of output: 1910


Confirmed against 255d722d. This head adds exactly the one test described:

  • New regression test: "keeps Nemotron 3 Super as the default when it is present in the live catalog (#5827)" in src/lib/inference/nvidia-featured-models.test.ts, Line 239. It feeds a mocked live catalog where Kimi K2.6 is listed before Nemotron 3 Super, and asserts getNvidiaFeaturedModelPromptOptions(null, ...) still resolves defaultModelId to nvidia/nemotron-3-super-120b-a12b.
  • Logic already correctly implements this: buildNvidiaFeaturedModelPromptOptions (Line 194) computes preferredDefault = defaultModelId || DEFAULT_CLOUD_MODEL, then only falls back to cloudModelOptions[0] when the preferred default isn't present in the list — so DEFAULT_CLOUD_MODEL (Nemotron 3 Super) wins over list order whenever it's actually in the live catalog, matching the PR's stated precedence ("keeps Nemotron 3 Super as the default when present; otherwise selects the first live featured model explicitly").
  • Nothing else changed in this commit — it's a pure test addition, no production code touched, consistent with the stated 76/76 suite pass and green hooks.

This is a clean, targeted regression addition with no issues. I'll proceed with the review.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cv cv added the area: inference Inference routing, serving, model selection, or outputs label Jul 1, 2026
@cv cv added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression v0.0.72 labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28544582477
Workflow ref: codex/pr6074-e2e
Requested targets: ubuntu-repo-cloud-openclaw
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28544582501
Workflow ref: codex/pr6074-e2e
Requested targets: (default — all supported)
Requested jobs: cloud-onboard,cloud-inference,inference-routing,onboard-resume,onboard-repair
Summary: 5 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
cloud-inference ✅ success
cloud-onboard ✅ success
inference-routing ✅ success
onboard-repair ✅ success
onboard-resume ✅ success

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ⚠️ Run cancelled — no signal

Run: 28545722732
Workflow ref: codex/pr6074-e2e
Requested targets: (default — all supported)
Requested jobs: kimi-inference-compat
Summary: 0 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
kimi-inference-compat ⚠️ cancelled

@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review\n\nExact head 2798717a6 fixes the advisor-identified custom NEMOCLAW_MODEL regression by keeping the effective live-menu default separate from the validated manual-entry prefill. Unsafe candidates are rejected before display. Focused tests pass 79/79, CLI typecheck and full commit hooks pass, and pre-push typecheck passes.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
🧩 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 2798717a

Length of output: 6682


@cv Verified against 2798717a. This head is exactly what's described:

  • Root cause fixed: promptCloudModel (src/lib/inference/model-prompts.ts) previously derived the manual "Other" prefill from the same defaultModelId used for the live-menu highlight (defaultCuratedIdx < 0 && defaultModelId && isSafeModelId(defaultModelId)). Since createNvidiaFeaturedModelSession.select() computes an effective menu default (Nemotron 3 Super, or first live model) via loadPromptOptions, a custom NEMOCLAW_MODEL env value got silently dropped whenever it differed from that effective default. Now manualDefaultModelId is a distinct option, independently checked against curated-list membership and isSafeModelId, so the custom value survives regardless of what the live catalog picked as its highlighted default.
  • Wiring: nvidia-featured-model-selection.ts now passes manualDefaultModelId: configuredModel (the trimmed env model) alongside the effective defaultModelId from loadPromptOptions(configuredModel) — confirmed by the new session-level test asserting promptCloudModel receives both fields correctly.
  • Unsafe rejection before display: the "does not render or accept an unsafe manual-entry default" test feeds a multiline spoofed value ("bad\n 1) spoof") as manualDefaultModelId; it's correctly excluded via isSafeModelId, never rendered in the prompt label, never passed to the validator, and the prefill falls back to blank — matching the stated behavior.
  • Legacy callers that only pass defaultModelId (not manualDefaultModelId) retain the original behavior via the ?? defaultModelId fallback, so this is backward compatible.

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 performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cv

cv commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review\n\nFinal candidate head a9e56dd06 adds the docs contract for the restored safe custom-model prefill. npm run docs passes with 0 errors (2 pre-existing warnings), inference docs tests pass 2/2, variants are current, commit hooks and pre-push CLI typecheck pass.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ⚠️ Some jobs cancelled — partial pass

Run: 28546156188
Workflow ref: codex/pr6074-e2e
Requested targets: (default — all supported)
Requested jobs: cloud-onboard,cloud-inference,inference-routing,onboard-resume,onboard-repair,kimi-inference-compat
Summary: 1 passed, 0 failed, 5 cancelled, 0 skipped

Job Result
cloud-inference ⚠️ cancelled
cloud-onboard ⚠️ cancelled
inference-routing ✅ success
kimi-inference-compat ⚠️ cancelled
onboard-repair ⚠️ cancelled
onboard-resume ⚠️ cancelled

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ⚠️ Run cancelled — no signal

Run: 28546156159
Workflow ref: codex/pr6074-e2e
Requested targets: ubuntu-repo-cloud-openclaw
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 0 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
live ⚠️ cancelled

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor
🧩 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 a9e56dd0

Length of output: 1622


@cv Verified against a9e56dd0. This head is exactly the documentation-only addition described:

  • Single file changed: docs/inference/inference-options.mdx, +3/−0, no code touched — consistent with the stated docs-only diff.
  • Content matches the fix in 2798717a: the three new sentences accurately describe the restored behavior:
    1. A safe custom NEMOCLAW_MODEL absent from the live catalog no longer silently replaces the live menu default.
    2. Selecting Other uses that value as the pre-filled manual entry, which NemoClaw validates against NVIDIA Endpoints before continuing.
    3. An unsafe NEMOCLAW_MODEL value is neither displayed nor accepted as the manual-entry prefill.
  • This directly documents the manualDefaultModelId/isSafeModelId separation introduced previously, so the docs are now consistent with the actual promptCloudModel behavior.

Nothing else stood out — this is a clean, accurate documentation contract for the fix. I'll proceed with the review.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28546330898
Workflow ref: codex/pr6074-e2e
Requested targets: ubuntu-repo-cloud-openclaw
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All requested jobs passed

Run: 28546330993
Workflow ref: codex/pr6074-e2e
Requested targets: (default — all supported)
Requested jobs: cloud-onboard,cloud-inference,inference-routing,onboard-resume,onboard-repair,kimi-inference-compat
Summary: 6 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
cloud-inference ✅ success
cloud-onboard ✅ success
inference-routing ✅ success
kimi-inference-compat ✅ success
onboard-repair ✅ success
onboard-resume ✅ success

@apurvvkumaria
apurvvkumaria merged commit 669d91a into NVIDIA:main Jul 1, 2026
189 checks passed
@wscurran wscurran added the area: docs Documentation, examples, guides, or docs build label Jul 1, 2026
@miyoungc miyoungc mentioned this pull request Jul 2, 2026
3 tasks done
ericksoa pushed a commit that referenced this pull request Jul 2, 2026
## 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 -->
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- 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]>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## 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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation, examples, guides, or docs build area: inference Inference routing, serving, model selection, or outputs area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated model list from NVIDIA Endpoints

5 participants