Skip to content

fix(onboard): honor Ollama no-tools override during validation#4250

Merged
cv merged 2 commits into
NVIDIA:mainfrom
rluo8:fix/4234-ollama-require-tools-second-gate
May 27, 2026
Merged

fix(onboard): honor Ollama no-tools override during validation#4250
cv merged 2 commits into
NVIDIA:mainfrom
rluo8:fix/4234-ollama-require-tools-second-gate

Conversation

@rluo8
Copy link
Copy Markdown
Contributor

@rluo8 rluo8 commented May 26, 2026

Summary

Honors NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 during Local Ollama endpoint validation. This lets users who explicitly accept tools-incapable Ollama models continue onboarding instead of failing later on the strict tool-calling validation probe.

Related Issue

Fixes #4234

Changes

  • Keeps Local Ollama tool-calling validation enabled by default.
  • Disables the strict Chat Completions tool-calling probe when NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 is set.
  • Aligns endpoint validation with the earlier Ollama model capability gate.

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)

Verification

  • [√ ] npx prek run --all-files passes
  • [√] npm test passes
  • Tests added or updated for new or changed behavior
  • [√] No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make 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: rluo8 ruluo@nvidia.com

Summary by CodeRabbit

  • New Features
    • Ollama model tool-calling validation is now configurable via an environment variable. Users can opt out of strict tool-calling checks during local model selection and provider setup, improving compatibility with varied Ollama installations and workflows.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

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: 794fea20-2d76-4e90-a7a8-1567d0da68f9

📥 Commits

Reviewing files that changed from the base of the PR and between 476d754 and e563529.

📒 Files selected for processing (1)
  • src/lib/onboard.ts

📝 Walkthrough

Walkthrough

The change modifies Ollama model endpoint validation to respect the NEMOCLAW_OLLAMA_REQUIRE_TOOLS environment variable. The requireChatCompletionsToolCalling flag is now set conditionally—enabled by default but disabled when the env var is exactly "0"—allowing completion-only Ollama models to be onboarded when the user explicitly opts out of tool-calling support.

Changes

Ollama Tool-Calling Override

Layer / File(s) Summary
Conditional tool-calling validation
src/lib/onboard.ts
selectAndValidateOllamaModel now sets requireChatCompletionsToolCalling from process.env.NEMOCLAW_OLLAMA_REQUIRE_TOOLS !== "0" instead of hardcoding true, allowing the escape hatch environment variable to control tool-calling validation during Ollama model selection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped in to check a tiny model's role,
Found a flag that freed it from a strict patrol.
With NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 set,
Completion-only models we won't forget.
A happy rabbit squeaks, "Onboard them whole!"

🚥 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 accurately describes the main change: making Ollama validation honor the NEMOCLAW_OLLAMA_REQUIRE_TOOLS environment override during the validation process.
Linked Issues check ✅ Passed The PR addresses the core requirement from issue #4234: making the endpoint validation respect the NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 override by making requireChatCompletionsToolCalling conditional based on the environment variable.
Out of Scope Changes check ✅ Passed The single-line change to src/lib/onboard.ts is directly scoped to the issue requirement of honoring the environment override during validation, with no extraneous modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@wscurran wscurran added enhancement: performance fix Local Models Running NemoClaw with local models NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). labels May 26, 2026
@wscurran
Copy link
Copy Markdown
Contributor

@rluo8 rluo8 added the v0.0.52 Release target label May 27, 2026
@cv cv added v0.0.53 Release target and removed v0.0.52 Release target labels May 27, 2026
@cv cv merged commit 0a2962c into NVIDIA:main May 27, 2026
28 checks passed
@rluo8 rluo8 deleted the fix/4234-ollama-require-tools-second-gate branch May 27, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement: performance fix Local Models Running NemoClaw with local models NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). v0.0.53 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS][Onboard] NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 override is ignored during endpoint validation for tools-incapable Ollama models

3 participants