Skip to content

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

Description

@hulynn

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

  1. Install Ollama and pull a tools-incapable model:
    brew services start ollama
    ollama pull tinyllama
  2. Confirm tinyllama is tools-incapable:
    curl -s http://127.0.0.1:11434/api/show -d '{"name":"tinyllama"}' | jq .capabilities
    # → ["completion"]   (no "tools")
  3. 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
  4. Observe output (early check honors override; validation does not).
  5. nemoclaw list confirms no no-tools-allow sandbox is created.

Expected Result

With NEMOCLAW_OLLAMA_REQUIRE_TOOLS=0 set:

  • Onboard completes through step [8/8].
  • Sandbox no-tools-allow is created with provider=ollama-local and 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).


NVB#6222741

Activity

  1. self-assigned this
    on May 26, 2026
  2. added a commit that references this issue on May 27, 2026
    0a2962c
  3. added
    area: inferenceInference routing, serving, model selection, or outputs
    area: local-modelsLocal model providers, downloads, launch, or connectivity
    area: providersInference provider integrations and provider behavior
    enhancementNew capability or improvement request
    and removed on Jun 3, 2026
  4. added theissue type on Jun 8, 2026
  5. changed the issue type fromtoon Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NV QABugs found by the NVIDIA QA Teamarea: inferenceInference routing, serving, model selection, or outputsarea: local-modelsLocal model providers, downloads, launch, or connectivityarea: providersInference provider integrations and provider behaviorplatform: macosAffects macOS, including Apple Silicon

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions