openclaw - ✅(Solved) Fix [Bug]: When requesting Ollama, it times out if it takes longer than 60 seconds. [2 pull requests, 2 comments, 3 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#63175Fetched 2026-04-09 07:57:28
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
1
Timeline (top)
cross-referenced ×3commented ×2labeled ×2referenced ×1

"agents": { "defaults": { "model": { "primary": "ollama/gemma4:e4b" }, "models": { "ollama/gemma4:e4b": {}, "ollama/gemma4:26b": {} }, "workspace": "/Users/xxxxxx/.openclaw/workspace", "compaction": { "mode": "safeguard" }, "timeoutSeconds": 1800 // <<<------ Is this timeout setting effective? } }

Root Cause

"agents": { "defaults": { "model": { "primary": "ollama/gemma4:e4b" }, "models": { "ollama/gemma4:e4b": {}, "ollama/gemma4:26b": {} }, "workspace": "/Users/xxxxxx/.openclaw/workspace", "compaction": { "mode": "safeguard" }, "timeoutSeconds": 1800 // <<<------ Is this timeout setting effective? } }

Fix Action

Fixed

PR fix notes

PR #63180: fix: address Ollama timeout issue

Description (problem / solution / changelog)

Summary

Fixes an issue where Ollama requests would timeout after 60 seconds regardless of configuration.

Changes

  • Updated pi-embedded-runner to pass timeoutMs to ensureGlobalUndiciStreamTimeouts

Testing

  • Verified timeout logic in code

Fixes openclaw/openclaw#63175

Changed files

  • src/agents/pi-embedded-runner/run/attempt.ts (modified, +1/-1)

PR #63207: fix: respect agents.defaults.timeoutSeconds in HTTP request timeout

Description (problem / solution / changelog)

Summary

Fixes issue #63175: Ollama times out if response takes > 60 seconds (v2026.4.8 regression).

Root Cause

in provider-transport-fetch.ts did not pass timeoutMs to fetchWithSsrFGuard. This caused LLM HTTP requests to fall back to undici's dispatcher default timeout of ~60 seconds (30s headersTimeout + 30s bodyTimeout), completely ignoring the agents.defaults.timeoutSeconds config (e.g., 1800s for a 30-minute timeout).

Fix

Thread timeoutMs from agents.defaults.timeoutSeconds through the entire transport stream chain to buildGuardedModelFetch:

  • provider-transport-fetch.ts: buildGuardedModelFetch accepts optional { timeoutMs } and passes it to fetchWithSsrFGuard, which creates an AbortController timeout
  • openai/anthropic/google-transport-stream.ts: extract timeoutMs from agent config opts and pass to client creators → buildGuardedModelFetch
  • provider-transport-stream.ts: pass timeoutMs through createSupportedTransportStreamFn
  • stream-resolution.ts: inject timeoutMs into providerStreamFn wrapper and createBoundaryAwareStreamFnForModel calls
  • attempt.ts: pass params.timeoutMs to resolveEmbeddedAgentStreamFn and registerProviderStreamForModel
  • command/types.ts: add timeoutMs?: number to AgentStreamParams

Testing

Code logic review: the fix correctly threads timeoutMs through the chain from EmbeddedRunAttemptParams.timeoutMsresolveEmbeddedAgentStreamFnregisterProviderStreamForModelcreateSupportedTransportStreamFn → transport stream functions → buildGuardedModelFetchfetchWithSsrFGuard.

Regression Context

In v2026.4.8, a change caused buildGuardedModelFetch to be called without timeoutMs, making agents.defaults.timeoutSeconds completely ineffective. Users with timeoutSeconds: 1800 still saw requests time out at ~60s.

Files Changed

  • src/agents/provider-transport-fetch.ts
  • src/agents/provider-transport-stream.ts
  • src/agents/provider-stream.ts
  • src/agents/pi-embedded-runner/stream-resolution.ts
  • src/agents/pi-embedded-runner/run/attempt.ts
  • src/agents/openai-transport-stream.ts
  • src/agents/anthropic-transport-stream.ts
  • src/agents/google-transport-stream.ts
  • src/agents/command/types.ts

Changed files

  • .pr-body.txt (added, +21/-0)
  • extensions/feishu/package.json (modified, +5/-0)
  • package.json (modified, +1/-0)
  • pnpm-lock.yaml (modified, +3/-0)
  • src/agents/anthropic-transport-stream.ts (modified, +5/-3)
  • src/agents/command/types.ts (modified, +2/-0)
  • src/agents/google-transport-stream.ts (modified, +2/-2)
  • src/agents/openai-transport-stream.ts (modified, +12/-7)
  • src/agents/pi-embedded-runner/run/attempt.ts (modified, +2/-0)
  • src/agents/pi-embedded-runner/stream-resolution.ts (modified, +14/-4)
  • src/agents/provider-stream.ts (modified, +2/-1)
  • src/agents/provider-transport-fetch.ts (modified, +5/-1)
  • src/agents/provider-transport-stream.ts (modified, +9/-6)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

"agents": { "defaults": { "model": { "primary": "ollama/gemma4:e4b" }, "models": { "ollama/gemma4:e4b": {}, "ollama/gemma4:26b": {} }, "workspace": "/Users/xxxxxx/.openclaw/workspace", "compaction": { "mode": "safeguard" }, "timeoutSeconds": 1800 // <<<------ Is this timeout setting effective? } }

Steps to reproduce

It happens every time.

Expected behavior

I hope the timeout value can be set.

Actual behavior

OpenClaw version

all

Operating system

macOS 26.4

Install method

No response

Model

gemma4:e4b

Provider / routing chain

local

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue may be resolved by verifying the effectiveness of the timeoutSeconds setting in the configuration.

Guidance

  • Review the configuration file to ensure the timeoutSeconds setting is correctly applied to the intended model or workflow.
  • Check the documentation for the specific OpenClaw version being used to understand how timeout settings are handled.
  • Verify that the timeoutSeconds value is being overridden or ignored elsewhere in the configuration or code.
  • Test the configuration with a different timeout value to see if it has any effect on the behavior.

Example

No specific code example is provided as the issue lacks detailed information about the implementation.

Notes

The issue lacks specific logs, error messages, or detailed configuration, making it difficult to provide a precise solution. The guidance provided is based on the information given and may need to be adapted based on the actual implementation and version of OpenClaw being used.

Recommendation

Apply workaround: Verify the configuration and test with different timeout values to understand how the setting is being applied, as the current information does not clearly imply an upgrade to a fixed version would resolve the issue.

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

I hope the timeout value can be set.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING