#Failed to discover Ollama models and AI high response time

1 messages · Page 1 of 1 (latest)

spiral lilyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

stray pasture
#

Krill?

olive plumeBOT
# stray pasture Krill?

Hey! Yep — I’m here.

What’s up? Are you hitting the “Failed to discover Ollama models” error, the slow response time, or both? If you paste:

  • the exact error text (or screenshot)
  • your openclaw --version
  • and whether Ollama is local or remote (and its URL, e.g. http://localhost:11434)

…I can help you narrow it down fast.

stray pasture
#

Both Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : ollama/llama3.2:3b
Fallbacks (1) : "ollama/llama3.2:1b"
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (2): "ollama/llama3.2:1b", ollama/llama3.2:3b

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -

  • ollama effective=env:ollama-local | env=ollama-local | source=env: OLLAMA_API_KEY | models.json=ollama-local | source=models.json: ~/.openclaw/agents/main/agent/models.json

Missing auth

  • "ollama Run openclaw configure or set an API key env var.

OAuth/token status

  • none
olive plumeBOT
# stray pasture Both Failed to discover Ollama models: TimeoutError: The operation was aborted d...

That output is basically two separate problems:

  1. OpenClaw can’t talk to your Ollama server fast enough (so model discovery times out)
  2. Even when it can, the local model is slow (so responses are high-latency)

1) Fix “Failed to discover Ollama models: TimeoutError …”

OpenClaw’s Ollama discovery hits the native Ollama endpoints (/api/tags + /api/show) on the Gateway host, defaulting to http://127.0.0.1:11434.

On the machine running the Gateway, can you run and paste:

curl -v --max-time 3 http://127.0.0.1:11434/api/tags
ollama list
  • If the curl call hangs or times out → this is an Ollama-side issue (ollama not running, stuck, wrong host/namespace like Docker/WSL, etc.).
  • If it’s instant → then we look at OpenClaw logs next (openclaw logs --follow) to see what exactly it’s timing out on.
#

Common gotcha: Gateway and Ollama aren’t on the same host

If your Gateway is in Docker / WSL / a VPS and Ollama is on your desktop, then 127.0.0.1:11434 is the wrong machine.

In that case you need explicit provider config pointing at the reachable Ollama host (and Ollama must listen on a non-loopback interface). Docs: https://docs.openclaw.ai/providers/ollama

2) Fix the “Missing auth” / env confusion

For Ollama, the “API key” can be any string (it’s just an opt-in flag). But if your Gateway runs as a service, it often doesn’t inherit your shell env, hence “Shell env: off”.

Most reliable fix: put this into ~/.openclaw/.env on the gateway host:

OLLAMA_API_KEY=ollama-local

then restart:

#
openclaw gateway restart
openclaw models status

(FAQ section on env: https://docs.openclaw.ai/help/faq#i-started-the-gateway-via-the-service-and-my-env-vars-disappeared-what-now)

3) High response time (what’s “normal” + what to check)

Local Ollama models can be very slow if you’re on CPU or a weak GPU, and OpenClaw tends to be more demanding than “chat in terminal” because tool-use style prompts are heavier.

Quick checks:

ollama ps

See whether it’s actually using GPU/Metal/CUDA vs CPU.

Also: by default, OpenClaw disables streaming for Ollama due to an upstream SDK issue (so it can feel like it “hangs” and then dumps the full reply). That’s expected behavior per docs.

#

If you paste:

  • the curl result,
  • and tell me where each runs (Gateway host = ?, Ollama host = ?: same machine or different? docker/wsl/vps?),

…I can tell you the exact config you need (implicit discovery vs explicit baseUrl).

stray pasture
#

🦞 OpenClaw 2026.2.6-3 (85ed6c7) — Chat APIs that don't require a Senate hearing.

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Log file: /tmp/openclaw/openclaw-2026-02-09.log
05:07:35 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:47:00 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:47:00 info ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🦞 OPENCLAW 🦞

05:47:00 info Run "openclaw doctor --fix" to apply changes.
05:47:03 info 2026.2.6-3
05:47:07 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:47:07 info ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🦞 OPENCLAW 🦞

05:49:45 info Run "openclaw doctor --fix" to apply changes.
05:49:50 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:49:50 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:49:50 info No npm-installed plugins to update.
05:49:54 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:49:55 info {
"service": {
"label": "systemd",
"loaded": false,
"loadedText": "enabled",
"notLoadedText": "disabled",
"command": null,
"runtime": {
"status": "unknown",
"detail": "Error: systemctl --user unavailable: Failed to connect to bus: No medium found"
},
"configAudit": {
"ok": false,
"issues": [
{
"code": "gateway-path-missing",
"message": "Gateway service PATH is not set; the daemon should use a minimal PATH.",
"level": "recommended"
}
]
}
},
"config": {
"cli": {
"path": "/home/aiuser/.openclaw/openclaw.json",
"exists": true,
"valid": true
},
"daemon": {
"path": "/home/aiuser/.openclaw/openclaw.json",
"exists": true,
"valid": true
}
},
"gateway": {
"bindMode": "loopback",
"bindHost": "127.0.0.1",
"port": 18789,
"portSource": "env/config",
"probeUrl": "ws://127.0.0.1:18789",
"probeNote": "Loopback-only gateway; only local clients can connect."
},
"port": {
"port": 18789,
"status": "free",
"listeners": [],
"hints": []
},
"rpc": {
"ok": false,
"error": "gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: cli --url\nConfig: /home/aiuser/.openclaw/openclaw.json",
"url": "ws://127.0.0.1:18789"
},
"extraServices": []
}
05:49:59 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:50:03 debug plugins {"subsystem":"plugins"} plugin CLI register skipped (memory-core): command already registered (memory)
05:50:03 info Dashboard URL:
05:50:04 info Copy to clipboard unavailable.
05:50:04 info No GUI detected. Open from your computer:
ssh -N -L 18789:127.0.0.1:18789 aiuser@<host>

olive plumeBOT
# stray pasture 🦞 OpenClaw 2026.2.6-3 (85ed6c7) — Chat APIs that don't require a Senate hearing...

Your log snippet is the real smoking gun: the Gateway isn’t running at all.

  • port.status: "free" on 18789 ⇒ nothing is listening
  • rpc.ok: false / gateway closed (1006 …) ⇒ CLI can’t talk to the gateway

Until the Gateway is up, you’ll get weird secondary failures (including model checks / discovery paths depending on what command you run).

1) Get the Gateway running first

On the gateway host:

openclaw gateway start
openclaw gateway status

You want Runtime: running and the RPC probe to be OK. If it’s still not coming up, paste openclaw gateway status output and the last ~50 lines of:

#
openclaw logs --follow

Note: your systemctl --user unavailable: Failed to connect to bus: No medium found strongly suggests you’re in an environment where the user systemd daemon can’t run (common in some containers/WSL/minimal VPS images). In that case, don’t rely on the daemon yet—run the gateway in a long-lived shell (tmux/screen) or fix the host so user systemd works.

2) Then debug “Failed to discover Ollama models: Timeout”

On the same machine the gateway runs on, check if Ollama is reachable:

curl -v --max-time 3 http://127.0.0.1:11434/api/tags
ollama list
  • If that times out: Ollama isn’t reachable from the gateway host (not running, hung, or it’s on a different machine).
  • If your Ollama is on a different machine than the Gateway: 127.0.0.1 will never work. You’ll need explicit Ollama provider config pointing at the remote host (and note: explicit config disables autodiscovery, so you define models manually). Docs: https://docs.openclaw.ai/providers/ollama
#

3) “Missing auth” / env

For Ollama, the “key” can be any string; it’s basically an opt-in flag. If you’re running the gateway as a service, put it in ~/.openclaw/.env:

OLLAMA_API_KEY=ollama-local

Then restart gateway and re-check openclaw models status. (Related env FAQ: https://docs.openclaw.ai/help/faq#i-started-the-gateway-via-the-service-and-my-env-vars-disappeared-what-now)

If you reply with:

  1. openclaw gateway status
  2. the curl .../api/tags result
  3. whether Ollama is same host as the Gateway or not

…I can tell you exactly which path you’re on and what to change.

finite arrow
#

Hi

olive plumeBOT
# finite arrow Hi

Hi tlx — welcome.

Are you here for the Ollama model discovery timeout, the slow response time, or something else? If you paste your exact error + openclaw --version, we can zero in fast.

stray pasture
#

🦞 OpenClaw 2026.2.6-3 (85ed6c7) — It's not "failing," it's "discovering new ways to configure the same thing wrong."

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Restarted systemd service: openclaw-gateway.service
jason@ai-companion:~$ openclaw gateway status

🦞 OpenClaw 2026.2.6-3 (85ed6c7) — Your terminal just grew claws—type something and let the bot pinch the busywork.

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout


Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-02-12.log
Command: /usr/bin/node /home/jason/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 156019, state active, sub running, last exit 0, reason 0)
RPC probe: ok

Listening: 127.0.0.1:18789
Troubles: run openclaw status

olive plumeBOT
# stray pasture 🦞 OpenClaw 2026.2.6-3 (85ed6c7) — It's not "failing," it's "discovering new way...

Nice — gateway side is healthy now (RPC probe: ok, listening on 127.0.0.1:18789). So the remaining error is specifically Ollama model discovery timing out.

OpenClaw’s Ollama discovery hits:

Quick isolate: is Ollama reachable from the gateway host?

On ai-companion (same machine as the gateway), paste:

curl -v --max-time 3 http://127.0.0.1:11434/api/tags

If that times out / connection refused → OpenClaw is correct to time out; Ollama isn’t reachable on loopback from that machine (common causes: Ollama not running, running in a different container/VM, bound to a different interface, etc.).

#

If it’s instant, then run one show call:

curl -sS --max-time 5 http://127.0.0.1:11434/api/show \
  -H 'content-type: application/json' \
  -d '{"name":"llama3.2:3b"}' | head

If /api/tags is fast but /api/show hangs, that’s usually the exact reason discovery times out.

Fast workaround: skip autodiscovery (manual provider config)

If you just want it to stop “discovering new ways to fail” and you know the exact models you want, define an explicit models.providers.ollama entry (this disables autodiscovery). The docs show the schema here: https://docs.openclaw.ai/providers/ollama

That also helps if Ollama is remote (not on 127.0.0.1).

One key question

Is Ollama running on the same machine as the gateway (ai-companion), or is Ollama on your desktop and the gateway is on a VPS/box?

#

Reply with:

  • output of the curl /api/tags
  • and “same host” vs “different host”

…and I’ll tell you the exact fix path (bind/interface vs explicit baseUrl vs manual models).

stray pasture
#

Trying 127.0.0.1:11434...

  • Connected to 127.0.0.1 (127.0.0.1) port 11434

GET /api/tags HTTP/1.1
Host: 127.0.0.1:11434
User-Agent: curl/8.5.0
Accept: /

< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Fri, 13 Feb 2026 02:04:19 GMT
< Content-Length: 1328
<
{"models":[{"name":"llama3.2:3b-2048","model":"llama3.2:3b-2048","modified_at":"2026-02-11T00:04:43.737164319-05:00","size":2019393204,"digest":"68fcc517df0a0eb91ec38439b02afcff84cfcf5ee68721ce62554ed208e2dc84","details":{"parent_model":"","format":"gguf","family":"llama","families":["llama"],"parameter_size":"3.2B","quantization_level":"Q4_K_M"}},{"name":"phi3:mini","model":"phi3:mini","modified_at":"2026-02-10T23:04:00.140515174-05:00","size":2176178913,"digest":"4f222292793889a9a40a020799cfd28d53f3e01af25d48e06c5e708610fc47e9","details":{"parent_model":"","format":"gguf","family":"phi3","families":["phi3"],"parameter_size":"3.8B","quantization_level":"Q4_0"}},{"name":"llama3.2:1b","model":"llama3.2:1b","modified_at":"2026-02-09T21:38:04.725838868-05:00","size":1321098329,"digest":"baf6a787fdffd633537aa2eb51cfd54cb93ff08e28040095462bb63daf552878","details":{"parent_model":"","format":"gguf","family":"llama","families":["llama"],"parameter_size":"1.2B","quantization_level":"Q8_0"}},{"name":"llama3.2:3b","mod* Connection #0 to host 127.0.0.1 left intact
el":"llama3.2:3b","modified_at":"2026-02-08T21:50:17.687709667-05:00","size":2019393189,"digest":"a80c4f17acd55265feec403c7aef86be0c25983ab279d83f3bcd3abbcb5b8b72","details":{"parent_model":"","format":"gguf","family":"llama","families":["llama"],"parameter_size":"3.2B","quantization_levcurl -sS --max-time 5
-H 'content-type: application/json'
-d '{"name":"llama3.2:3b"}' | head

#

gateway is on the same machine

olive plumeBOT
# stray pasture Trying 127.0.0.1:11434... * Connected to 127.0.0.1 (127.0.0.1) port 11434 > GET ...

Yep — /api/tags is reachable and returning fine from curl, so networking/port isn’t the issue.

What’s biting you here is that in OpenClaw 2026.2.6-3, Ollama “implicit discovery” is a single Node fetch() to:

http://127.0.0.1:11434/api/tags

…and it has a hard 5s timeout. If that request ever takes >5s (even intermittently), OpenClaw prints exactly the warning you’re seeing.

1) First, check if /api/tags ever exceeds 5s

Run this a few times:

time curl -sS http://127.0.0.1:11434/api/tags >/dev/null

If you see occasional ~5s+ runs, that fully explains the warning.

#

2) Most reliable fix: stop using implicit discovery (remove OLLAMA_API_KEY)

If you define Ollama explicitly in config, you don’t need OLLAMA_API_KEY at all (and removing it stops the implicit discovery path, so no more timeout warning).

Step A — remove the env var (common place is ~/.openclaw/.env):

  • delete/comment out OLLAMA_API_KEY=...
  • then restart gateway: openclaw gateway restart

Step B — add explicit provider + models in ~/.openclaw/openclaw.json (JSON5), e.g.:

{
  models: {
    providers: {
      ollama: {
        baseUrl: "http://127.0.0.1:11434/v1",
        api: "openai-completions",
#
        apiKey: "ollama-local",
        models: [
          {
            id: "llama3.2:3b",
            name: "llama3.2:3b",
            reasoning: false,
            input: ["text"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 8192,
            maxTokens: 8192,
          },
          {
            id: "llama3.2:1b",
            name: "llama3.2:1b",
            reasoning: false,
#
            input: ["text"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 8192,
            maxTokens: 8192,
          },
        ],
      },
    },
  },
}

Then:

#
openclaw gateway restart
openclaw models list
openclaw models status

Docs reference: https://docs.openclaw.ai/providers/ollama

3) (Optional) If you want to prove it’s Node-fetch timing out

This uses the same mechanism OpenClaw uses:

node -e 'const t=Date.now(); fetch("http://127.0.0.1:11434/api/tags",{signal:AbortSignal.timeout(5000)}).then(r=>r.json()).then(j=>console.log("OK",Date.now()-t,"ms","models",j.models.length)).catch(e=>console.error("ERR",Date.now()-t,"ms",e))'

#

If you paste the output of the time curl ... (a couple runs), I can tell you whether it’s “Ollama occasionally slow” vs “OpenClaw/env weirdness”.

#

Cool — same host + /api/tags returns 200 OK from curl means the wiring is right.

What’s happening is simpler (and more annoying): OpenClaw’s Ollama auto-discovery uses a hard 5s timeout on GET http://127.0.0.1:11434/api/tags. If that endpoint ever takes >5s (even intermittently, e.g. when the box is under load), you get:

Failed to discover Ollama models: TimeoutError …

Verify it’s just “occasionally >5s”

Run a quick loop:

for i in {1..10}; do
  time curl -sS http://127.0.0.1:11434/api/tags >/dev/null
done

If any run is ~5s+, that’s the warning.

#

Best workaround: stop using implicit discovery

If you don’t want OpenClaw to ever hit autodiscovery, remove the thing that triggers it: OLLAMA_API_KEY.

  • Remove/comment OLLAMA_API_KEY=... from wherever you set it (~/.openclaw/.env, shell profile, etc.)
  • Restart gateway: openclaw gateway restart

Then make sure you have an explicit Ollama provider + models (in ~/.openclaw/openclaw.json or in your existing ~/.openclaw/agents/main/agent/models.json). With explicit config, you can keep apiKey: "ollama-local" inside the config (doesn’t require env).

Docs (explicit/manual config example): https://docs.openclaw.ai/providers/ollama

Also: your /api/show curl was missing the URL

If you want to test that endpoint too:

curl -sS --max-time 5 http://127.0.0.1:11434/api/show \
  -H 'content-type: application/json' \
#
  -d '{"name":"llama3.2:3b"}' | head

If you paste the slowest timing from that for loop, I can tell you whether it’s “Ollama occasionally stalls” vs something else.

stray pasture
#

OLLAMA_API_KEY=ollama-local is in .env

olive plumeBOT
# stray pasture OLLAMA_API_KEY=ollama-local is in .env

Yep — that explains why you keep seeing the discovery timeout.

In current OpenClaw, having OLLAMA_API_KEY set (even to a dummy value) is the “opt-in” that turns on implicit Ollama provider + auto-discovery, and that discovery call has a hard 5s timeout for GET http://127.0.0.1:11434/api/tags. So if Ollama ever takes >5s to answer, OpenClaw prints:

Failed to discover Ollama models: TimeoutError …

Two ways forward

Option A (recommended): disable autodiscovery, use explicit config

This stops the timeout spam completely.

  1. Remove/comment it from ~/.openclaw/.env:
# OLLAMA_API_KEY=ollama-local
  1. Add an explicit provider entry in ~/.openclaw/openclaw.json (this disables autodiscovery by design):
#
{
  models: {
    providers: {
      ollama: {
        baseUrl: "http://127.0.0.1:11434/v1",
        api: "openai-completions",
        apiKey: "ollama-local",
        models: [
          {
            id: "llama3.2:3b",
            name: "llama3.2:3b",
            reasoning: false,
            input: ["text"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 8192,
#
            maxTokens: 8192,
          },
          {
            id: "llama3.2:1b",
            name: "llama3.2:1b",
            reasoning: false,
            input: ["text"],
            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
            contextWindow: 8192,
            maxTokens: 8192,
          },
        ],
      },
    },
  },
#
}
  1. Restart:
openclaw gateway restart
openclaw models status

Docs: https://docs.openclaw.ai/providers/ollama

Option B: keep autodiscovery, fix Ollama latency

If you want autodiscovery, you need Ollama’s /api/tags to reliably respond in <5s. Quick check:

#
for i in {1..10}; do time curl -sS http://127.0.0.1:11434/api/tags >/dev/null; done

If any run creeps above ~5 seconds, that’s exactly when OpenClaw logs the timeout.

If you tell me which option you want (A or B), I’ll stick to that path and help you finish the setup cleanly.

stray pasture
#

"apiKey": "ollama-local", is in the json

olive plumeBOT
# stray pasture "apiKey": "ollama-local", is in the json

Right — and that’s totally fine. The key detail is:

In 2026.2.6-3, if OLLAMA_API_KEY exists in the environment at all, OpenClaw will still try the implicit Ollama discovery path (the GET http://127.0.0.1:11434/api/tags with a hard 5s timeout) even if you already have an explicit models.providers.ollama configured.

So if you already have:

models: { providers: { ollama: { apiKey: "ollama-local", ... } } }

…then you can (and should) remove OLLAMA_API_KEY from ~/.openclaw/.env to stop the discovery timeout spam:

  1. Edit ~/.openclaw/.env and remove/comment:
# OLLAMA_API_KEY=ollama-local
#
  1. Restart:
openclaw gateway restart
openclaw models status

In openclaw models status, the Ollama “source=” should no longer say env: OLLAMA_API_KEY. If it still does, the var is being set somewhere else (systemd unit Environment=..., shell profile, etc.) and we can hunt that down next.

stray pasture
#

🦞 OpenClaw 2026.2.6-3 (85ed6c7) — Greetings, Professor Falken

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Restarted systemd service: openclaw-gateway.service
jason@ai-companion:~$ openclaw models status

🦞 OpenClaw 2026.2.6-3 (85ed6c7) — If you can describe it, I can probably automate it—or at least make it funnier.

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : ollama/llama3.2:3b
Fallbacks (1) : "ollama/llama3.2:1b"
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (2): "ollama/llama3.2:1b", ollama/llama3.2:3b

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -

  • ollama effective=env:ollama-local | env=ollama-local | source=env: OLLAMA_API_KEY | models.json=ollama-local | source=models.json: ~/.openclaw/agents/main/agent/models.json

Missing auth

  • "ollama Run openclaw configure or set an API key env var.

OAuth/token status

  • none
olive plumeBOT
# stray pasture 🦞 OpenClaw 2026.2.6-3 (85ed6c7) — Greetings, Professor Falken Failed to discov...

openclaw models status is giving you two different hints in one screen:

1) The “Missing auth - "ollama …” line is from a bad model key

Notice it prints:

  • Configured models (2): "ollama/llama3.2:1b", ollama/llama3.2:3b
  • Missing auth - "ollama …

That Missing auth entry is not for ollama — it’s for a provider literally named "ollama (quote included). That happens when you accidentally put a model override under:

agents.defaults.models

with a key that includes quotes inside the string, e.g.:

agents: {
#
  defaults: {
    models: {
      "\"ollama/llama3.2:1b\"": { /* ... */ } // <- wrong (quote is part of the key)
    }
  }
}

Fix: in ~/.openclaw/openclaw.json, make sure those keys are just:

agents: {
  defaults: {
    models: {
      "ollama/llama3.2:1b": { /* ... */ },
#
      "ollama/llama3.2:3b": { /* ... */ },
    }
  }
}

Restart gateway after editing.

2) The “Failed to discover Ollama models: TimeoutError …” is because OLLAMA_API_KEY is still set

As long as OLLAMA_API_KEY exists, OpenClaw enables implicit Ollama discovery and does a GET http://127.0.0.1:11434/api/tags with a hard 5s timeout.

Since you already have an explicit models.providers.ollama with apiKey in your JSON, you can just remove the env var entirely:

  1. Remove/comment it in ~/.openclaw/.env:
#
# OLLAMA_API_KEY=ollama-local
  1. Restart:
openclaw gateway restart
openclaw models status

If models status still shows source=env: OLLAMA_API_KEY, it’s being set somewhere else. Quick hunt:

env | grep OLLAMA
systemctl --user show openclaw-gateway.service -p Environment -p EnvironmentFiles
#

Paste those two outputs if it still won’t die.

stray pasture
#

"agents": {
"defaults": {
"model": {
"primary": "ollama/llama3.2:3b",
"fallbacks": [
""ollama/llama3.2:1b""
]
},

olive plumeBOT
#
"fallbacks": [
  "ollama/llama3.2:1b"
]

Then restart:

openclaw gateway restart
openclaw models status

That should remove the Missing auth line immediately.


#

The remaining “Failed to discover Ollama models: TimeoutError …” is separate and will persist as long as OLLAMA_API_KEY is still set somewhere. After the restart, if you still see discovery timeouts, run:

env | grep OLLAMA
systemctl --user show openclaw-gateway.service -p Environment -p EnvironmentFiles

and paste the output—then we’ll see exactly where OLLAMA_API_KEY is coming from.

stray pasture
#

},
"agents": {
"defaults": {
"model": {
"primary": "ollama/llama3.2:3b",
"fallbacks": [
"ollama/llama3.2:1b"
]
},
"models": {
""ollama/llama3.2:1b"": {
"params": {
"maxTokens": 128
}
},
"ollama/llama3.2:3b": {}
},

olive plumeBOT
# stray pasture }, "agents": { "defaults": { "model": { "primary": "ollama/l...

Yep — you fixed the fallback list, but you’ve still got the same quoting bug in the model allowlist:

"models": {
  "\"ollama/llama3.2:1b\"": { ... },   // <- wrong (quotes are part of the key)
  "ollama/llama3.2:3b": {}
}

That key literally starts with a " so OpenClaw thinks there’s a provider named "ollama (and then you get the goofy Missing auth / weird formatting).

Fix that key

Change it to:

"models": {
#
  "ollama/llama3.2:1b": {
    "params": { "maxTokens": 128 }
  },
  "ollama/llama3.2:3b": {}
}

Then:

openclaw gateway restart
openclaw models status

Separate issue: the discovery timeout banner

As long as OLLAMA_API_KEY is set in .env, OpenClaw will attempt Ollama auto-discovery (/api/tags) with a hard 5s timeout and print that warning when it misses.

#

So after the quoting fix, if you still want to get rid of the discovery timeout message entirely, you’ll need to unset OLLAMA_API_KEY (and rely on explicit models.providers.ollama config instead). But do the quoting fix first — that one is definitely wrong.

stray pasture
#

openclaw gateway restart

🦞 OpenClaw 2026.2.6-3 (85ed6c7)
We ship features faster than Apple ships calculator updates.

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Restarted systemd service: openclaw-gateway.service

olive plumeBOT
# stray pasture openclaw gateway restart 🦞 OpenClaw 2026.2.6-3 (85ed6c7) We ship features f...

That restart output still says:

Failed to discover Ollama models …
…and your models status earlier still showed source=env: OLLAMA_API_KEY

So OLLAMA_API_KEY is still in the environment that OpenClaw is seeing (either you didn’t remove it yet, or systemd is injecting it somewhere else).

1) Confirm where OLLAMA_API_KEY is coming from

Run:

systemctl --user show openclaw-gateway.service -p Environment -p EnvironmentFiles
env | grep OLLAMA

If the service shows it, it’s coming from systemd (Environment/EnvironmentFile), not your interactive shell.

#

If you want to be 100% sure what the running gateway process has:

pid=$(systemctl --user show -p MainPID --value openclaw-gateway.service)
tr '\0' '\n' < /proc/$pid/environ | grep OLLAMA

2) Remove it (so discovery stops timing out)

Delete/comment OLLAMA_API_KEY=... in ~/.openclaw/.env and check your unit file for an Environment= line:

rg -n "OLLAMA_API_KEY" ~/.openclaw/.env ~/.config/systemd/user/openclaw-gateway.service

Then:

#
systemctl --user daemon-reload
openclaw gateway restart

Once it’s gone, openclaw models status should no longer say source=env: OLLAMA_API_KEY, and the discovery timeout warning should stop.

3) Also fix your remaining quoted model key

You still have this in agents.defaults.models:

"\"ollama/llama3.2:1b\"": { ... }

That key should be:

#
"ollama/llama3.2:1b": { ... }

Otherwise you’ll keep getting weird provider/auth output.

If you paste the systemctl --user show ... output, I can tell you exactly which file is still injecting the env var.

stray pasture
#

jason@ai-companion:~$ systemctl --user show openclaw-gateway.service -p Environment -p EnvironmentFiles
env | grep OLLAMA
Environment=HOME=/home/jason PATH=/home/jason/.local/bin:/home/>
lines 1-1/1 (END)

#
  1. Also fix your remaining quoted model key can you give me the command to access this please?
olive plumeBOT
# stray pasture 3) Also fix your remaining quoted model key can you give me the command to acces...

To get to (and fix) whatever “quoted model key” you’re seeing, you have two good options:

Option A (recommended): use the model/config wizards

  • Model section wizard:
    openclaw configure --section model
    
    (Same thing via config command:)
    openclaw config --section model
    

Option B: inspect/change the exact config value from CLI

  • Show your current default model:
    openclaw config get agents.defaults.model
    
#
  • Set it (example):
    openclaw models set <model-id>
    
  • Or set it directly in config:
    openclaw config set agents.defaults.model "<model-id>"
    

If you meant “where is that in a file?”

Your main config file is:

  • ~/.openclaw/openclaw.json (unless you set OPENCLAW_CONFIG_PATH)

So you can open it in your editor and fix the line there.

Important note about “quoted keys”

In JSON5, keys that contain characters like - (and model/provider ids usually contain / and -) often must be quoted. So if the problem is “there are quotes”, that might actually be normal — if it’s complaining, it’s usually because of mismatched/extra quotes.

#

If you paste the exact line/error text that says “quoted model key” (or a small redacted snippet of that part of openclaw.json), I can tell you what to change precisely. Also please include:

openclaw --version
stray pasture
#

What are Option A steps?

olive plumeBOT
# stray pasture What are Option A steps?

Option A = use the interactive configure wizard for just the model section.

  1. Open a terminal on the machine where the Gateway runs.

  2. Run:

openclaw configure --section model
  1. In the prompts:
  • pick your default model (this sets agents.defaults.model)
  • if it offers a picker/allowlist, select what you want to appear in /model (this sets agents.defaults.models)
  1. When you exit/confirm, it writes to:
  • ~/.openclaw/openclaw.json
  1. Verify:
#
openclaw models status
  1. If it doesn’t automatically restart the Gateway (or your change doesn’t take effect), restart it:
openclaw gateway restart

(Note: restarting will briefly interrupt responses.)

If you paste the exact “quoted model key” snippet you’re trying to fix (redact keys), I can tell you exactly what field it is.

stray pasture
#

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : ollama/llama3.2:3b
Fallbacks (1) : ollama/llama3.2:1b
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (2): ollama/llama3.2:1b, ollama/llama3.2:3b

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -

  • ollama effective=env:ollama-local | env=ollama-local | source=env: OLLAMA_API_KEY | models.json=ollama-local | source=models.json: ~/.openclaw/agents/main/agent/models.json

OAuth/token status

  • none
olive plumeBOT
# stray pasture Failed to discover Ollama models: TimeoutError: The operation was aborted due to...

That error is coming from Ollama auto-discovery: OpenClaw tries to hit your local Ollama at http://127.0.0.1:11434/api/tags and it didn’t respond fast enough (there’s a ~5s timeout), so openclaw models status prints:

Failed to discover Ollama models: TimeoutError…

Step-by-step to diagnose/fix

  1. On the SAME machine that’s running the OpenClaw Gateway, run:
curl -sS --max-time 3 http://127.0.0.1:11434/api/tags
  • If that times out / errors → Ollama isn’t reachable (not running, wrong machine, wrong networking, wedged).
  1. Check Ollama itself:
ollama list
ollama ps
#
  • If ollama list hangs or is super slow, restart Ollama (however you manage it on your OS) and try the curl again.
  1. Most common cause: your Gateway is on a different host than Ollama.
  • OpenClaw’s Ollama discovery is hardcoded to talk to localhost by default (127.0.0.1:11434), so if your Gateway is on a VPS/Pi/etc and Ollama is on your desktop, discovery will always fail and model calls will be unreliable/slow.

If that’s your setup, tell me:

  • Is the Gateway local or remote?
  • Where is Ollama running (same box or different)?
  1. For the “responses took 9 minutes” part:
  • If Ollama is reachable but slow, try starting a fresh session to reduce context:
    • In Discord, send: /new (or /reset)
  • While it’s “thinking”, run ollama ps and see if it’s actually generating or stuck.

Quick info I need from you

Please paste:

stray pasture
#

krill?

#

the AI is responding with " right now I assume that because its timing out