openclaw - 💡(How to fix) Fix [Bug]: Embedded agent times out with Ollama (qwen2.5:1.5b) while direct Ollama works [16 comments, 15 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59098Fetched 2026-04-08 02:28:40
View on GitHub
Comments
16
Participants
15
Timeline
36
Reactions
0
Author
Timeline (top)
commented ×16subscribed ×13cross-referenced ×5labeled ×2

OpenClaw (v2026.3.31) successfully connects to a local Ollama model and passes all probes, but chat generation via OpenClaw consistently times out, while direct Ollama API calls succeed normally. This appears to be an issue with the embedded agent runtime or timeout handling, not with Ollama itself.

Root Cause

OpenClaw (v2026.3.31) successfully connects to a local Ollama model and passes all probes, but chat generation via OpenClaw consistently times out, while direct Ollama API calls succeed normally. This appears to be an issue with the embedded agent runtime or timeout handling, not with Ollama itself.

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

OpenClaw (v2026.3.31) successfully connects to a local Ollama model and passes all probes, but chat generation via OpenClaw consistently times out, while direct Ollama API calls succeed normally. This appears to be an issue with the embedded agent runtime or timeout handling, not with Ollama itself.

Steps to reproduce

  1. Direct Ollama works curl http://127.0.0.1:11434/api/chat Response: "Hello! It's nice to meet you..." Latency: ~4 seconds
  2. OpenClaw API times out curl http://127.0.0.1:18789/v1/chat/completions Response: Request timed out before a response was generated.
  3. Model probe succeeds openclaw models status --probe Result: ollama/qwen2.5:1.5b → ok · ~10–15s
  4. Embedded agent failure log Profile ollama:default timed out. Trying next account...

embedded_run_failover_decision: failoverReason: "timeout" provider: "ollama" model: "qwen2.5:1.5b" fallbackConfigured: false 5. Timeout behavior inconsistency agents.defaults.timeoutSeconds was set to 120 seconds Actual failure occurs at ~60 seconds Suggests timeout config is not respected in embedded run

Expected behavior

Calling: POST /v1/chat/completions should return a valid model response via OpenClaw using the configured Ollama model.

Actual behavior

The request always returns: Request timed out before a response was generated. Even though: Ollama responds correctly via direct API OpenClaw model probe succeeds Gateway and API endpoints are working

OpenClaw version

2026.3.31

Operating system

Raspberry Pi (Linux 6.12.x)

Install method

Openclaw Onboard

Model

Model: qwen2.5:1.5b

Provider / routing chain

Ollama: local instance (default port 11434)

Additional provider/model setup details

Configuration openclaw.json (simplified + restored versions tested) "agents": { "defaults": { "timeoutSeconds": 120, "model": { "primary": "ollama/qwen2.5:1.5b" } } } Both: full config simplified config → produce the same timeout behavior

Auth profile (auto-generated) ~/.openclaw/agents/main/agent/auth-profiles.json "ollama:default": { "type": "api_key", "provider": "ollama", "key": "ollama-local" }

Logs, screenshots, and evidence

Impact and severity

Impact OpenClaw cannot be used as an OpenAI-compatible gateway for local Ollama models Blocks usage for local AI assistant setups (e.g., Raspberry Pi AI Assistant)

Additional information

Suspected Cause One of the following: Embedded agent runtime timeout not aligned with timeoutSeconds Ollama streaming / response handling not properly awaited Early termination in provider execution layer Known issue with local provider execution path (Ollama)

extent analysis

TL;DR

The most likely fix is to investigate and adjust the timeout handling in the embedded agent runtime to align with the configured timeoutSeconds value.

Guidance

  • Verify that the timeoutSeconds value is being correctly read and applied in the embedded agent runtime by checking the OpenClaw configuration and logs.
  • Check the Ollama API documentation to ensure that the response handling and streaming are properly implemented and awaited in the OpenClaw gateway.
  • Investigate the provider execution layer for any early termination issues that may be causing the timeout.
  • Test the OpenClaw gateway with a different local model or provider to isolate the issue and determine if it's specific to the Ollama model or a more general problem.

Example

No code snippet is provided as the issue is more related to configuration and timeout handling.

Notes

The issue may be specific to the OpenClaw version (2026.3.31) or the local Ollama model setup, and further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by adjusting the timeoutSeconds value to a lower or higher value to see if it affects the timeout behavior, and investigate the embedded agent runtime and provider execution layer for any issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Calling: POST /v1/chat/completions should return a valid model response via OpenClaw using the configured Ollama model.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING