openclaw - 💡(How to fix) Fix [Bug]: models.providers.<id>.timeoutSeconds is silently clamped to 120 s when the provider baseUrl hostname isn't recognized as local — even though the docs say it should be honored.

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…

When models.providers.<id>.timeoutSeconds is set to a value greater than 120 s, OpenClaw silently caps it at the internal DEFAULT_LLM_IDLE_TIMEOUT_MS (120 000 ms) for any provider whose baseUrl hostname doesn't match the built-in local-host string check. The same clamped value also caps the underlying HTTP request's total wall-clock timeout, so requests are aborted every ~2 minutes even while tokens are streaming. This affects any provider whose host is genuinely private but uses a hostname that looks public to a literal string check — for example Tailscale MagicDNS hostnames (*.ts.net). The classifier does pure hostname-string matching with no DNS resolution, so it can't see that the hostname resolves to a private CGNAT IP that the same classifier would otherwise recognize. For non-local-classified providers it's silently overridden, with no opt-out.

Root Cause

When models.providers.<id>.timeoutSeconds is set to a value greater than 120 s, OpenClaw silently caps it at the internal DEFAULT_LLM_IDLE_TIMEOUT_MS (120 000 ms) for any provider whose baseUrl hostname doesn't match the built-in local-host string check. The same clamped value also caps the underlying HTTP request's total wall-clock timeout, so requests are aborted every ~2 minutes even while tokens are streaming. This affects any provider whose host is genuinely private but uses a hostname that looks public to a literal string check — for example Tailscale MagicDNS hostnames (*.ts.net). The classifier does pure hostname-string matching with no DNS resolution, so it can't see that the hostname resolves to a private CGNAT IP that the same classifier would otherwise recognize. For non-local-classified providers it's silently overridden, with no opt-out.

Code Example



---

"models": {
  "providers": {
    "<id>": {
      "baseUrl": "https://<host>.<tailnet>.ts.net",
      "isLocal": true,
      "timeoutSeconds": 7200
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When models.providers.<id>.timeoutSeconds is set to a value greater than 120 s, OpenClaw silently caps it at the internal DEFAULT_LLM_IDLE_TIMEOUT_MS (120 000 ms) for any provider whose baseUrl hostname doesn't match the built-in local-host string check. The same clamped value also caps the underlying HTTP request's total wall-clock timeout, so requests are aborted every ~2 minutes even while tokens are streaming. This affects any provider whose host is genuinely private but uses a hostname that looks public to a literal string check — for example Tailscale MagicDNS hostnames (*.ts.net). The classifier does pure hostname-string matching with no DNS resolution, so it can't see that the hostname resolves to a private CGNAT IP that the same classifier would otherwise recognize. For non-local-classified providers it's silently overridden, with no opt-out.

Steps to reproduce

Environment

  • OpenClaw 2026.5.x
  • Ollama provider over a private network with a public-looking hostname (Tailscale MagicDNS or similar)
  • LLM with large num_ctx, configured to allow partial CPU offload

Reproduction

  • Configure a remote Ollama service reached through a hostname that's actually private but doesn't end in .local and doesn't have a literal private-range IP in the URL (e.g. a Tailscale MagicDNS *.ts.net hostname).
  • Set models.providers.<id>.timeoutSeconds: 7200.
  • Use a model + num_ctx combination that takes more than 2 minutes to complete a single request on that hardware.
  • Send a prompt.

Expected behavior

The configured 7200 s timeout is honored as both the idle threshold and the underlying HTTP total-request cap, per documentation.

Actual behavior

The HTTP request to the provider is aborted at ~120 s mark — even while tokens are actively streaming. The runner retries the model call from scratch, the user sees the reply restart every ~2 minutes, and the loop eventually surfaces as an EmbeddedAttemptSessionTakeoverError when retry budgets run out.

No log line warns that the configured timeoutSeconds was overridden.

OpenClaw version

OpenClaw 2026.5.18 (50a2481)

Operating system

Ubuntu Server 26.04

Install method

curl -fsSL https://openclaw.ai/install.sh | bash

Model

qwen3.6:27b-q4_K_M

Provider / routing chain

openclaw -> tailnet -> ollama

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Suggested fix Add an explicit per-provider opt-out so users can declare a provider as local when the heuristic can't detect it:

"models": {
  "providers": {
    "<id>": {
      "baseUrl": "https://<host>.<tailnet>.ts.net",
      "isLocal": true,
      "timeoutSeconds": 7200
    }
  }
}

No response

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

The configured 7200 s timeout is honored as both the idle threshold and the underlying HTTP total-request cap, per documentation.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING