Repository navigation
[macOS][Onboard] NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 override is ignored during endpoint validation for tools-incapable Ollama models #4234
Description
Description
The documented escape hatch NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 (intended for non-interactive automation using completion-only Ollama models) is only partially honored. The early-stage capability check at src/lib/inference/ollama/proxy.ts:716+ detects the override and prints "NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 set — proceeding...". But the subsequent endpoint validation at src/lib/inference/local.ts:934 still probes Ollama with a tool definition, receives HTTP 400 "does not support tools", and unconditionally returns ok:false. Onboard aborts with exit 1; no sandbox is created. The escape hatch is effectively dead-letter in v0.0.50.
Environment
Device: MacBook Pro (Apple M4)
OS: macOS 26.1 (Darwin 25.1.0)
Architecture: arm64
Node.js: v23.10.0
npm: 11.3.0
Docker: 27.4.0 (Colima 0.0.44, 6 vCPU / 11.7 GiB)
OpenShell CLI: 0.0.44
NemoClaw: v0.0.50
OpenClaw: N/A (onboard aborts before sandbox creation)
Ollama: v0.21.2 (brew install)
Model under test: tinyllama:latest (capabilities = ["completion"] only)
Steps to Reproduce
- Install Ollama and pull a tools-incapable model:
brew services start ollama ollama pull tinyllama
- Confirm
tinyllamais tools-incapable:curl -s http://127.0.0.1:11434/api/show -d '{"name":"tinyllama"}' | jq .capabilities # → ["completion"] (no "tools")
- Run non-interactive onboard with the override env var:
NEMOCLAW_NON_INTERACTIVE=1 \ NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 \ NEMOCLAW_PROVIDER=ollama \ NEMOCLAW_MODEL=tinyllama:latest \ NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1 \ nemoclaw onboard --fresh --name no-tools-allow
- Observe output (early check honors override; validation does not).
nemoclaw listconfirms nono-tools-allowsandbox is created.
Expected Result
With NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 set:
- Onboard completes through step [8/8].
- Sandbox
no-tools-allowis created withprovider=ollama-localand the tools-incapable model registered (the user has accepted that tool calls will fail at runtime). - Exit code 0.
Actual Result
[3/8] Configuring inference provider
──────────────────────────────────────────────────
[non-interactive] Provider: ollama
✓ Using Ollama on localhost:11434 (proxy on :11435)
⚠ Ollama model 'tinyllama:latest' does not advertise the 'tools' capability.
...
NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 set — proceeding with 'tinyllama:latest' despite missing 'tools'.
Loading Ollama model: tinyllama:latest
Local Ollama endpoint validation failed.
Chat Completions API: HTTP 400: registry.ollama.ai/library/tinyllama:latest does not support tools
EXIT_CODE=1
Verified: nemoclaw list shows "No sandboxes registered."
Logs
Root cause (source code analysis):
File: src/lib/inference/local.ts around line 934 (endpoint validator):
try {
const parsed = JSON.parse(output);
if (parsed && typeof parsed.error === "string" && parsed.error.trim()) {
const errText = parsed.error.trim();
if (/does not support tools/i.test(errText)) {
return {
ok: false, // ← UNCONDITIONAL reject
message: `Selected Ollama model '${model}' does not support tool calling, ...`,
};
}
...
}
} catch { /* ignored */ }
This branch does NOT consult process.env.NEMOCLAW_OLLAMA_REQUIRE_TOOLS, whereas the earlier check at src/lib/inference/ollama/proxy.ts:716 does:
if (process.env.NEMOCLAW_OLLAMA_REQUIRE_TOOLS === "0") {
// proceed despite missing 'tools'
}Suggested fix: mirror the env-var check in the endpoint validator. If override is set, return ok:true (the user has accepted the trade-off).
Activity
fix(onboard): honor Ollama no-tools override during validation (#4250)