openclaw - ✅(Solved) Fix [Bug]: HTTP client timeout hardcoded to 15s, cannot be configured or increased [1 pull requests, 2 comments, 2 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#63156Fetched 2026-04-09 07:57:43
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
commented ×2labeled ×2cross-referenced ×1referenced ×1

OpenClaw's HTTP client has a hardcoded 15-second timeout that cannot be configured. This causes request failures when prompt processing exceeds 15s, blocking normal usage with large context injections.

Error Message

Request fails with 15000ms timeout error regardless of configuration. The underlying HTTP client (@buape/carbon) has a hardcoded 15s limit that cannot be overridden.

Root Cause

  • Not a performance issue: Model inference speed is normal (51 tokens/s)
  • Not a configuration issue: All config attempts failed or were ignored
  • Root cause: HTTP client layer has hardcoded 15s limit that cannot be overridden
  • Impact: Blocks usage of large contexts, which is common in real-world scenarios

Fix Action

Fixed

PR fix notes

PR #63191: fix: add timeoutSeconds config for model providers

Description (problem / solution / changelog)

Summary

This PR adds a configurable timeoutSeconds field to model provider configuration, allowing users to customize HTTP client timeouts for different providers.

Changes

  1. types.models.ts: Added timeoutSeconds?: number to ModelProviderConfig type
  2. zod-schema.core.ts: Added validation for timeoutSeconds field in ModelProviderSchema
  3. run/attempt.ts: Use provider-specific timeout when configuring undici HTTP client

Motivation

Fixes issue #63156 where HTTP client timeout was effectively hardcoded, causing request failures when prompt processing exceeded the default timeout. This is especially problematic for:

  • Local LLM providers (LM Studio, Ollama) with slower inference
  • Large context injections requiring longer processing time
  • Models with variable response times

Usage

Users can now configure provider-specific timeouts:

{
  "models": {
    "providers": {
      "lm-studio": {
        "baseUrl": "http://127.0.0.1:1234/v1",
        "api": "openai-completions",
        "timeoutSeconds": 180
      },
      "ollama": {
        "baseUrl": "http://127.0.0.1:11434",
        "api": "ollama",
        "timeoutSeconds": 300
      }
    }
  }
}

Testing

  • Type checking passes
  • Backward compatible (timeoutSeconds is optional)
  • Falls back to undici default (30 minutes) when not configured

Related Issues

  • Closes #63156

Changed files

  • package.json (modified, +1/-1)
  • pnpm-lock.yaml (modified, +9/-9)
  • src/agents/pi-embedded-runner/run/attempt.ts (modified, +8/-1)
  • src/agents/pi-embedded-subscribe.tools.ts (modified, +17/-2)
  • src/config/types.models.ts (modified, +1/-0)
  • src/config/zod-schema.core.ts (modified, +1/-0)
  • src/media/parse.ts (modified, +17/-6)

Code Example

**LM Studio Configuration**:
- URL: `http://127.0.0.1:1234/v1`
- Model: qwen3.5-35b-a3b (Custom Provider)

**Hardware**:
- CPU: AMD Ryzen 9 7900X (12 core 24 thread)
- GPU: NVIDIA RTX 4070 Ti SUPER (16GB GDDR6X)
- RAM: 64GB DDR5 6000MHz

**Model Performance**: 51 tokens/s (normal, no performance issues)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw's HTTP client has a hardcoded 15-second timeout that cannot be configured. This causes request failures when prompt processing exceeds 15s, blocking normal usage with large context injections.

Steps to reproduce

  1. Start OpenClaw v2026.4.8+ with LM Studio provider at http://127.0.0.1:1234/v1
  2. Configure agents.defaults.timeoutSeconds = 180 in openclaw.json
  3. Send a message requiring large context injection (workspace files + memory data)
  4. Observe timeout after exactly 15s instead of configured 180s

Expected behavior

Request should complete within the configured timeout value (e.g., 180 seconds or 60 seconds).

Actual behavior

Request fails with 15000ms timeout error regardless of configuration. The underlying HTTP client (@buape/carbon) has a hardcoded 15s limit that cannot be overridden.

Evidence:

  • Log shows: 15000ms instead of configured 180 seconds
  • File location: node_modules/@buape/carbon/dist/src/classes/RequestClient.js, line 8: timeout: 15000

OpenClaw version

2026.4.8 (commit: 9ece252)

Operating system

Windows 10 ( 22H2 19045.6466 )

Install method

npm global install

Model

qwen3.5-35b-a3b via LM Studio

Provider / routing chain

openclaw -> lm-studio provider (http://127.0.0.1:1234/v1)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

**LM Studio Configuration**:
- URL: `http://127.0.0.1:1234/v1`
- Model: qwen3.5-35b-a3b (Custom Provider)

**Hardware**:
- CPU: AMD Ryzen 9 7900X (12 core 24 thread)
- GPU: NVIDIA RTX 4070 Ti SUPER (16GB GDDR6X)
- RAM: 64GB DDR5 6000MHz

**Model Performance**: 51 tokens/s (normal, no performance issues)

Impact and severity

1. Hardcoded Timeout Source

// File: C:\Users\Administrator\AppData\Roaming\npm\node_modules\openclaw\node_modules\@buape\carbon\dist\src\classes\RequestClient.js
// Line: 8
timeout: 15000  // Hardcoded! Cannot be configured

### Additional information

## Investigation Timeline
| Time | Action | Result |
|------|--------|--------|
| Initial | Timeout issue reported | Logs show 15000ms instead of 180s |
| Investigation | Searched npm packages | Found `@buape/carbon` package with hardcoded timeout |
| Attempt 1 | LM Studio provider config | Invalid field, rejected by schema |
| Attempt 2 | Memory search optimization | Timeout persisted |
| Verification | Direct LM Studio test | No timeout issues (confirms model is fine) |

## Why This Matters
- **Not a performance issue**: Model inference speed is normal (51 tokens/s)
- **Not a configuration issue**: All config attempts failed or were ignored
- **Root cause**: HTTP client layer has hardcoded 15s limit that cannot be overridden
- **Impact**: Blocks usage of large contexts, which is common in real-world scenarios

## Proposed Solutions
1. Add `timeoutMs` parameter to `models.providers.lm-studio` config schema
2. Increase default timeout from 15000ms to at least 60000ms
3. Implement async request handling with configurable timeouts

extent analysis

TL;DR

The most likely fix is to modify the @buape/carbon package to allow configuration of the timeout value, currently hardcoded to 15 seconds.

Guidance

  • Identify the line of code responsible for the hardcoded timeout in @buape/carbon and consider submitting a pull request to make this value configurable.
  • As a temporary workaround, consider using a different HTTP client that allows for configurable timeouts.
  • Verify that the configured timeout value is being passed correctly to the HTTP client and that it is being respected.
  • Investigate the feasibility of implementing async request handling with configurable timeouts as a long-term solution.

Example

// Example of how the timeout could be made configurable
class RequestClient {
  constructor(timeoutMs = 15000) {
    this.timeoutMs = timeoutMs;
  }

  // ...
}

Notes

The provided information suggests that the issue is specific to the @buape/carbon package and its hardcoded timeout. However, without more information about the package's maintainers or the feasibility of modifying the package, it's difficult to provide a more detailed solution.

Recommendation

Apply a workaround by using a different HTTP client that allows for configurable timeouts, as modifying the @buape/carbon package may not be feasible or may take time to implement.

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

Request should complete within the configured timeout value (e.g., 180 seconds or 60 seconds).

Still need to ship something?

×6

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

Back to top recommendations

TRENDING