Skip to content

[Bug]: Ollama provider fails after upgrade in Orb VM with “No API key found” error despite local host setup #84875

Closed

Description

@NirvanaCh7

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Upgraded from version 2026.3.31 (maybe) to 2026.5.19, OpenClaw cannot connect to local Ollama and reports: No API key found for provider "ollama"

Steps to reproduce

  1. Run Ollama on the host/root system.
  2. Run OpenClaw inside the Orb virtual machine. Select a local Ollama model without environment values.
  3. Upgrade OpenClaw from a version before 2026.3.31 to 2026.5.19.
  4. Select a local Ollama model and send a message.
  5. Try running auth login again.

Expected behavior

  • OpenClaw inside the Orb VM should connect to the host Ollama instance normally.
  • Local Ollama models should work without requiring a real API key or auth profile.
  • Behavior should remain the same as before the upgrade.

Actual behavior

  • OpenClaw reports: No API key found for provider "ollama"
  • No Ollama auth-profiles are available.
  • Running auth login again still cannot connect to Ollama.
  • Local oMLX models work normally from the same OpenClaw instance.
  • Everything worked correctly before upgrading.

OpenClaw version

2026.5.19

Operating system

macOS 15.7 host, Ubuntu 24.04 orb virtual

Install method

pnpm global from source

Model

qwen3.5:27b

Provider / routing chain

openclaw -> ollama -> qwen3.5:27b

Additional provider/model setup details

No response

Logs, screenshots, and evidence

model config


      "ollama": {
        "apiKey": "ollama-local",
        "baseUrl": "http://host.orb.internal:11434",
        "api": "ollama",
        "models": [
          {
            "id": "kimi-k2.5:cloud",
            "name": "kimi-k2.5:cloud",
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 128000,
            "maxTokens": 8192,
            "params": {
              "num_ctx": 128000
            },
            "api": "ollama",
            "reasoning": false,
            "input": [
              "text"
            ]
          },
          {
            "id": "minimax-m2.5:cloud",
            "name": "minimax-m2.5:cloud",
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 128000,
            "api": "ollama",
            "input": [
              "text"
            ],
            "reasoning": false,
            "maxTokens": 8192,
            "params": {
              "num_ctx": 128000
            }
          },
          {
            "id": "glm-5:cloud",
            "name": "glm-5:cloud",
            "cost": {
              "input": 0,
              "output": 0,
              "cacheWrite": 0,
              "cacheRead": 0
            },
            "contextWindow": 128000,
            "reasoning": false,
            "api": "ollama",
            "params": {
              "num_ctx": 128000
            },
            "input": [
              "text"
            ],
            "maxTokens": 8192
          },
          {
            "id": "qwen3.5:27b",
            "name": "qwen3.5:27b",
            "cost": {
              "input": 0,
              "output": 0,
              "cacheWrite": 0,
              "cacheRead": 0
            },
            "contextWindow": 262144,
            "params": {
              "num_ctx": 262144
            },
            "maxTokens": 8192,
            "reasoning": false,
            "api": "ollama",
            "input": [
              "text"
            ]
          },
          {
            "id": "glm-4.7-flash:latest",
            "name": "glm-4.7-flash:latest",
            "cost": {
              "input": 0,
              "output": 0,
              "cacheWrite": 0,
              "cacheRead": 0
            },
            "contextWindow": 202752,
            "params": {
              "num_ctx": 202752
            },
            "maxTokens": 8192,
            "input": [
              "text"
            ],
            "reasoning": false
          }
        ]
      },
      "omlx-local-mac": {
        "baseUrl": "http://host.orb.internal:8000/v1",
        "apiKey": "1234",
        "api": "openai-completions",
        "models": [
          {
            "id": "Qwen3.5-27B-4bit",
            "name": "qwen3.5:27B",
            "input": [
              "text"
            ]
          }
        ]
      }

openclaw logs

06:08:29+00:00 error Embedded agent failed before reply: No API key found for provider "ollama". Auth store: /home/nirvanach7/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /home/nirvanach7/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy only portable static auth profiles from the main agentDir. | No API key found for provider "ollama". Auth store: /home/nirvanach7/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /home/nirvanach7/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy only portable static auth profiles from the main agentDir.

auth login


nirvanach7@openclaw:~/.openclaw$  openclaw models auth login --provider ollama

🦞 OpenClaw 2026.5.19 (a185ca2) — Your second brain, except this one actually remembers where you left things.
│
◇  Ollama mode
│  Cloud + Local
│
◇  Ollama base URL
│  http://host.orb.internal:11434
│
◇  Ollama ─────────────────────────────────────────────────────────╮
│                                                                  │
│  Ollama could not be reached at http://host.orb.internal:11434.  │
│  Download it at https://ollama.com/download                      │
│                                                                  │
│  Start Ollama and re-run setup.                                  │
│                                                                  │
├──────────────────────────────────────────────────────────────────╯
WizardCancelledError: Ollama not reachable
nirvanach7@openclaw:~/.openclaw$ curl http://host.orb.internal:11434
Ollama is running
nirvanach7@openclaw:~/.openclaw$ curl http://host.orb.internal:11434/api/generate -d '{
  "model": "qwen3.5:27b",
  "prompt": "test"
}'
{"model":"qwen3.5:27b","created_at":"2026-05-21T07:46:41.276034Z","response":"","thinking":"Okay","done":false}
{"model":"qwen3.5:27b","created_at":"2026-05-21T07:46:41.423831Z","response":"","thinking":",","done":false}
{"model":"qwen3.5:27b","created_at":"2026-05-21T07:46:41.563806Z","response":"","thinking":" the","done":false}
{"model":"qwen3.5:27b","created_at":"2026-05-21T07:46:41.70267Z","response":"","thinking":" user","done":false}
{"model":"qwen3.5:27b","created_at":"2026-05-21T07:46:41.842449Z","response":"","thinking":" just","done":false}
{"model":"qwen3.5:27b","created_at":"2026-05-21T07:46:41.983375Z","response":"","thinking":" sent","done":false}
^C

Impact and severity

Affected:Users running OpenClaw in an Orb VM connecting to Ollama running on the host/root machine.
Severity:Blocks use of local Ollama models (cannot send messages).
Frequency:Always occurs after upgrading.
Consequence:Ollama models become unusable in OpenClaw (shows “No API key found for provider "ollama"”), while other providers like oMLX still work.

Additional information

Regression observed: Ollama worked correctly before the upgrade.
Last known good version: before 2026.3.31 (exact version uncertain)
First known bad version: 2026.3.31–2026.5.19 range after upgrade
Ollama runs on host/root system, while OpenClaw runs inside an Orb virtual machine.
oMLX provider continues to work normally in the same environment.

Activity

  1. added
    bug
    on May 21, 2026
  2. changed the title [-][Bug]: No API key found for provider "ollama"[/-] [+][Bug]: Ollama provider fails after upgrade in Orb VM with “No API key found” error despite local host setup[/+] on May 21, 2026
  3. added
    regression
    on May 21, 2026
  4. clawsweeper commented on May 21, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.

    Workflow note: Future ClawSweeper reviews update this same comment in place.

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Summary
    Keep open: current main still has a source-visible path where an explicit local Ollama marker is not accepted for the Orb host alias, so the reported missing-key failure is plausible and not implemented away.

    Reproducibility: yes. from source inspection: with baseUrl: "http://host.orb.internal:11434" and no real env/profile credential, both the generic and Ollama-specific local-auth predicates leave the provider without usable auth. I did not run a live Orb VM reproduction in this read-only review.

    Next step
    This is a narrow repair candidate, but a worker should also verify whether the setup /api/tags failure is the same root cause or a separate reachability probe issue.

    Review details

    Best possible solution:

    Support the Orb VM host alias as an explicit local/self-hosted Ollama no-auth path, with regression tests proving host.orb.internal works while public remote hosts still require real credentials.

    Do we have a high-confidence way to reproduce the issue?

    Yes from source inspection: with baseUrl: "http://host.orb.internal:11434" and no real env/profile credential, both the generic and Ollama-specific local-auth predicates leave the provider without usable auth. I did not run a live Orb VM reproduction in this read-only review.

    Is this the best way to solve the issue?

    No, current main is not the best end state because it treats a common VM host alias as remote for local-auth purposes. The safer repair is a narrow alias/local-host-policy fix plus tests, not a broad relaxation for arbitrary public remotes.

    Label changes:

    • add P2: The issue blocks an Ollama provider workflow in a specific VM-to-host setup, but the blast radius is limited to that provider/environment.
    • add impact:auth-provider: The failure is provider auth and routing for local Ollama models after upgrade.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.

    Label justifications:

    • P2: The issue blocks an Ollama provider workflow in a specific VM-to-host setup, but the blast radius is limited to that provider/environment.
    • impact:auth-provider: The failure is provider auth and routing for local Ollama models after upgrade.

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/agents/model-auth.test.ts extensions/ollama/src/discovery-shared.test.ts extensions/ollama/index.test.ts extensions/ollama/src/setup.test.ts
    • git diff --check

    What I checked:

    • Current auth path drops the local marker for this host shape: resolveUsableCustomProviderApiKey only accepts a non-secret local marker for api: "ollama" when the provider base URL passes isLocalBaseUrl; that predicate accepts loopback, .local, and private IPv4 hosts, but not a dotted alias like host.orb.internal. (src/agents/model-auth.ts:191, 4a360ac1cc18)
    • Ollama synthetic auth has the same local-host boundary: The Ollama plugin only mints synthetic ollama-local auth when shouldUseSyntheticOllamaAuth sees a local Ollama base URL; the helper treats loopback, private IP, .local, IPv6 local, and bare hostnames as local, leaving host.orb.internal outside the accepted set. (extensions/ollama/src/discovery-shared.ts:103, 4a360ac1cc18)
    • Setup reachability is a separate /api/tags probe: The interactive setup path calls fetchOllamaModels(baseUrl) and cancels when that probe reports unreachable; fetchOllamaModels probes ${baseUrl}/api/tags, while the report only demonstrates / and /api/generate, so this part still needs focused verification. (extensions/ollama/src/setup.ts:541, 4a360ac1cc18)
    • Existing tests do not cover the Orb alias: The local-host tests cover loopback, private IPs, .local, IPv6 local, and bare hostnames, and classify dotted public-looking hostnames as remote; there is no coverage for host.orb.internal. (extensions/ollama/src/discovery-shared.test.ts:4, a185ca283a74)
    • Shipped release has the same predicate: The v2026.5.19 release target contains the same isLocalBaseUrl predicate, matching the reporter's first-bad version and confirming this is not fixed in the shipped version they used. (src/agents/model-auth.ts:257, a185ca283a74)
    • Available history points to the current Ollama auth surface: git blame ties the current local-host and synthetic-auth logic to commit 2e389b6a46a0e005b53a42c464d1409c99aaf2ef; git show v2026.5.19^{} shows Peter Steinberger authored the release target containing the same Ollama files. (extensions/ollama/src/discovery-shared.ts:103, 2e389b6a46a0)

    Likely related people:

    • Peter Steinberger: Available blame and release-tag history tie the current Ollama local-auth predicates and the v2026.5.19 Ollama surface to Peter-authored commits. (role: recent area contributor; confidence: medium; commits: 2e389b6a46a0, a185ca283a74; files: src/agents/model-auth.ts, extensions/ollama/src/discovery-shared.ts, extensions/ollama/index.ts)

    Remaining risk / open question:

    • The setup failure may be a second issue because current setup probes /api/tags, while the report only proves / and /api/generate from the VM.
    • The fix must preserve the boundary that public Ollama Cloud and public remote hosts require real credentials.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 4a360ac1cc18.

  5. added
    P2
    impact:auth-provider
    issue-rating: 🦞 diamond lobster
    clawsweeper:source-repro
    on May 21, 2026
  6. xieetudousi commented on May 21, 2026

    @xieetudousi

    Hi @NirvanaCh7, I ran into this exact issue after upgrading to 2026.5.19 with Ollama too.

    The 5.19 release changed how agent-level auth profiles are resolved. Quick things to try:

    1. Check agent-level auth: Run openclaw agents auth list to see if oLlama is registered. If not, add it: openclaw agents auth add --provider ollama --api-key ollama-local

    2. The apiKey fix: Your provider config has apiKey: "ollama-local" which is good. But in 5.19, the agent-level auth store takes precedence. Setting both the provider-level key and the agent-level auth should fix the "No API key found" error.

    3. Orb VM reachability: The curl test works (which is great), but the auth wizard reported Ollama not reachable. This seems to be a timeout issue in the auth wizard's health-check path, not an actual connectivity problem. You can bypass the wizard and manually add auth.

    If you're still stuck after trying these, I've helped a couple people deploy OpenClaw on Orb VMs with local Ollama before — happy to take a closer look at your config if needed.

  7. locked as resolved and limited conversation to collaborators on May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bugclawsweeper:source-reproimpact:auth-providerissue-rating: 🦞 diamond lobsterregression

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions