Skip to content

fix(onboard): clarify Ollama model selection - #6874

Merged
cv merged 12 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-6758-ollama-model-default
Jul 19, 2026
Merged

fix(onboard): clarify Ollama model selection#6874
cv merged 12 commits into
NVIDIA:mainfrom
HOYALIM:codex/issue-6758-ollama-model-default

Conversation

@HOYALIM

@HOYALIM HOYALIM commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Interactive Ollama onboarding can reuse a same-gateway model without explaining why the model menu was skipped. This change makes the existing one-route-per-gateway constraint visible and gives the exact separate-gateway path for choosing a different model.

Related Issue

Fixes #6758

Changes

  • Report the required Ollama model when another sandbox already owns the shared gateway route.
  • Explain that a different model requires an unused NEMOCLAW_GATEWAY_PORT.
  • Document a complete separate-gateway onboarding command with NEMOCLAW_MODEL.
  • Cover the interactive guidance while preserving non-interactive behavior and the existing route guard.

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: the shared-gateway route guard and locked model remain unchanged; this patch only reports the guard's existing result before model preparation.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project cli src/lib/onboard/setup-nim-ollama.test.ts (8 passed)
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: not applicable; this is a focused diagnostic message guarded by the existing route-compatibility test surface.
  • 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 (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Ho Lim subhoya@gmail.com

Summary by CodeRabbit

  • New Features
    • Added interactive onboarding guidance for shared-gateway scenarios when an Ollama model is required.
  • Bug Fixes
    • Guidance is now shown only in interactive onboarding and suppressed for non-interactive runs.
  • Documentation
    • Updated Ollama setup docs with gateway-scoped model selection guidance, including an example using a different gateway port to select another model.
  • Tests
    • Expanded route-guard tests to validate guidance logging behavior for interactive vs. non-interactive modes and improved mock restoration between tests.

Copilot AI review requested due to automatic review settings July 14, 2026 15:33
@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 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 Jul 14, 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
📝 Walkthrough

Walkthrough

Ollama onboarding now logs shared gateway route guidance during interactive setup, keeps that guidance silent in non-interactive mode, verifies both behaviors, and documents using another gateway port to select a different model.

Changes

Ollama onboarding route guidance

Layer / File(s) Summary
Shared gateway route guidance
src/lib/onboard/setup-nim-ollama.ts, src/lib/onboard/setup-nim-ollama.test.ts, docs/inference/set-up-ollama.mdx
Interactive preflight logs the required Ollama model and alternate NEMOCLAW_GATEWAY_PORT; tests cover interactive logging and non-interactive suppression; documentation explains selecting another model through a different gateway port.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#6338: Adds related shared-gateway required-model guidance and associated onboarding tests.

Suggested labels: area: docs, area: inference

Suggested reviewers: cv

🚥 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 reflects the Ollama onboarding model-selection clarification.
Linked Issues check ✅ Passed The changes explain how to choose a different Ollama model and document the separate-gateway path required when the shared route is already in use.
Out of Scope Changes check ✅ Passed All code, tests, and docs changes support the Ollama onboarding clarification; no unrelated scope is evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: onboard-repair, onboard-resume, cloud-onboard

2 optional E2E recommendations
  • gateway-guard-recovery
  • inference-routing

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Signed-off-by: Ho Lim <subhoya@gmail.com>
Signed-off-by: Ho Lim <subhoya@gmail.com>

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/onboard/setup-nim-ollama.test.ts (1)

66-106: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Restore console spies even when a test fails.

log.mockRestore() runs only after successful assertions. Wrap each test in try/finally, or use an afterEach cleanup, so a failed test cannot leak the mocked global console.log into subsequent tests.

As per coding guidelines, deterministic tests must restore spies and reset test globals reliably.

Also applies to: 109-135

🤖 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/setup-nim-ollama.test.ts` around lines 66 - 106, Ensure the
console.log spy created in the setup Ollama tests is always restored, including
when assertions or the handler fail. Add shared afterEach cleanup or wrap each
affected test, including the additional test around lines 109-135, in
try/finally so log.mockRestore() executes on every exit path.

Source: Coding guidelines

🤖 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/set-up-ollama.mdx`:
- Around line 186-190: Update the onboarding guidance around the
NEMOCLAW_GATEWAY_PORT example to explicitly state that 8990 is only an example
and must be an unused port; retain the command while clarifying that users
should choose another unused port if necessary.

---

Outside diff comments:
In `@src/lib/onboard/setup-nim-ollama.test.ts`:
- Around line 66-106: Ensure the console.log spy created in the setup Ollama
tests is always restored, including when assertions or the handler fail. Add
shared afterEach cleanup or wrap each affected test, including the additional
test around lines 109-135, in try/finally so log.mockRestore() executes on every
exit path.
🪄 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: ee2d97a2-3367-495b-9238-3e93e6db5677

📥 Commits

Reviewing files that changed from the base of the PR and between cf04a13 and d634d4f.

📒 Files selected for processing (3)
  • docs/inference/set-up-ollama.mdx
  • src/lib/onboard/setup-nim-ollama.test.ts
  • src/lib/onboard/setup-nim-ollama.ts

Comment thread docs/inference/set-up-ollama.mdx Outdated
@HOYALIM

HOYALIM commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Advisor warning in d634d4f: non-interactive onboarding now has explicit coverage proving shared-route guidance stays silent while the required model is still forwarded as lockedModel. Validation: npx vitest run src/lib/onboard/setup-nim-ollama.test.ts src/lib/inference/ollama/proxy.test.ts (16 passed) and npm run check:diff passed.

HOYALIM added 2 commits July 14, 2026 10:32
Signed-off-by: Ho Lim <subhoya@gmail.com>
Signed-off-by: Ho Lim <subhoya@gmail.com>
@HOYALIM

HOYALIM commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the remaining CodeRabbit outside-diff cleanup finding in e34dcad: the test file now restores all Vitest spies in afterEach, so console.log cannot leak when a handler or assertion fails. Validation: npx vitest run src/lib/onboard/setup-nim-ollama.test.ts (9 passed), npm run typecheck:cli, and npm run check:diff passed.

@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression provider: ollama Ollama local model provider behavior labels Jul 14, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for the fix, @HOYALIM. Clarifying the Ollama model selection constraint and separate-gateway path should resolve the onboarding confusion. Ready for maintainer review.


Related open issues:

@prekshivyas prekshivyas self-assigned this Jul 16, 2026
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

@prekshivyas prekshivyas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the shared-gateway Ollama guidance end to end. It reports the route-locked model only in interactive mode, preserves non-interactive behavior, documents the separate-port escape hatch, and passes focused tests, CLI build/typecheck, and docs-route validation.

@prekshivyas

Copy link
Copy Markdown
Collaborator

@cv Exact-head fork E2E skip approval is ready for 3a8e0353cea3ecf6def0fafcd92fda5d5e6091a6. Normal CI is green; PR Advisor is 0/0/0, CodeRabbit is green, and there are no unresolved threads. The protected approval is waiting in workflow run 29464661128. Please approve the pending approve-credentialed-e2e-skip-for-fork-pr environment for this exact SHA.

@prekshivyas
prekshivyas requested a review from cv July 16, 2026 01:56
@cv cv added the v0.0.89 label Jul 19, 2026
@cv
cv merged commit ffd21fb into NVIDIA:main Jul 19, 2026
44 of 45 checks passed
@ericksoa ericksoa mentioned this pull request Jul 20, 2026
21 tasks
ericksoa added a commit that referenced this pull request Jul 20, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical dated changelog entry for NemoClaw `v0.0.89` before
the release plan captures the tag commit.
The entry summarizes the user-visible Station preparation, inference,
recovery, policy-disclosure, and CLI-containment changes merged since
`v0.0.88`.

## Changes

- Add `docs/changelog/2026-07-20.mdx` with the exact `## v0.0.89`
release heading, parser-safe SPDX comment, summary, and detailed
bullets.
- Link each shipped theme to the most specific published OpenClaw
documentation routes.
- Keep internal E2E, advisory-registry, and review-workflow refactors
out of the user-facing release summary.

Source summary:

- #7214, #7241, #7237, #7223, #7204, #7202, #7183, and #7090 ->
`docs/changelog/2026-07-20.mdx`: Summarize qualified DGX Station
identity, package-state, PackageKit, DKMS, and reboot-handoff fixes.
- #7242, #7221, #7186, #7164, and #6874 ->
`docs/changelog/2026-07-20.mdx`: Summarize inference endpoint
provenance, provider attachment, managed vLLM cleanup and progress, and
Ollama selection guidance.
- #7225, #7216, #7192, #7136, #7096, and #6910 ->
`docs/changelog/2026-07-20.mdx`: Summarize sandbox readiness, recovery
guidance, rebuilt model routing, durable Hermes state, and gateway
restart behavior.
- #7187 -> `docs/changelog/2026-07-20.mdx`: Summarize complete effective
messaging-preset egress disclosure before policy mutation.
- #7218, #7165, and #7184 -> `docs/changelog/2026-07-20.mdx`: Summarize
structured output containment, terminal-safe route display, and Hermes
forward cleanup.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: This PR adds release-history
prose only; the focused changelog contract test validates its required
structure and routes.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `mise exec node@22.23.1 -- npx vitest
run test/changelog-docs.test.ts` (6 passed).
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not applicable to this doc-only release
entry.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — `mise
exec node@22.23.1 -- npm run docs` completed with 0 errors and 2
existing site-wide warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— the native changelog entry uses the required parser-safe MDX SPDX
comment and does not use frontmatter.

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Expanded DGX Station installation support for qualified GB300 and
OTA-upgraded environments.
* Preserved selected inference providers, endpoints, model pins, and
tuning settings during sandbox creation and rebuilds.
* Improved sandbox recovery by validating availability and stability
before restarting services.
* Added clearer policy output showing the complete effective messaging
egress configuration.

* **Bug Fixes**
* Hardened status and inference route displays by sanitizing terminal
control characters.
* Improved Hermes uninstall behavior by stopping detached dashboard
forwarding.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression provider: ollama Ollama local model provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to use a different Ollama model for a new agent during onboarding

5 participants