Repository navigation
Description
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
- Run Ollama on the host/root system.
- Run OpenClaw inside the Orb virtual machine. Select a local Ollama model without environment values.
- Upgrade OpenClaw from a version before 2026.3.31 to 2026.5.19.
- Select a local Ollama model and send a message.
- 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}
^CImpact 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.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
[-][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[/+]clawsweeper commentedon May 21, 2026
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 re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto 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/tagsfailure 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.internalworks 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:
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.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.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:
What I checked:
resolveUsableCustomProviderApiKeyonly accepts a non-secret local marker forapi: "ollama"when the provider base URL passesisLocalBaseUrl; that predicate accepts loopback,.local, and private IPv4 hosts, but not a dotted alias likehost.orb.internal. (src/agents/model-auth.ts:191, 4a360ac1cc18)ollama-localauth whenshouldUseSyntheticOllamaAuthsees a local Ollama base URL; the helper treats loopback, private IP,.local, IPv6 local, and bare hostnames as local, leavinghost.orb.internaloutside the accepted set. (extensions/ollama/src/discovery-shared.ts:103, 4a360ac1cc18)/api/tagsprobe: The interactive setup path callsfetchOllamaModels(baseUrl)and cancels when that probe reports unreachable;fetchOllamaModelsprobes${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).local, IPv6 local, and bare hostnames, and classify dotted public-looking hostnames as remote; there is no coverage forhost.orb.internal. (extensions/ollama/src/discovery-shared.test.ts:4, a185ca283a74)v2026.5.19release target contains the sameisLocalBaseUrlpredicate, 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)git blameties the current local-host and synthetic-auth logic to commit2e389b6a46a0e005b53a42c464d1409c99aaf2ef;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:
src/agents/model-auth.ts,extensions/ollama/src/discovery-shared.ts,extensions/ollama/index.ts)Remaining risk / open question:
/api/tags, while the report only proves/and/api/generatefrom the VM.Codex review notes: model gpt-5.5, reasoning high; reviewed against 4a360ac1cc18.
xieetudousi commentedon May 21, 2026
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:
Check agent-level auth: Run
openclaw agents auth listto see if oLlama is registered. If not, add it:openclaw agents auth add --provider ollama --api-key ollama-localThe 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.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.