Skip to content

fix(core): default provider header and chunk timeouts to five minutes - #46917

Open
rekram1-node wants to merge 2 commits into
v2from
v2-timeouts
Open

fix(core): default provider header and chunk timeouts to five minutes#46917
rekram1-node wants to merge 2 commits into
v2from
v2-timeouts

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Sets default timeouts of five minutes (300,000 ms) for provider requests: one for waiting on response headers, and one for the gap between streamed response chunks. Requests that exceed either limit fail with a transport error and follow the existing retry policy. The chunk timer resets whenever data arrives, so it limits inactivity, not total response duration.

Both timeouts apply to native @opencode-ai/ai routes and to the AI SDK path. They are carried on HttpOptions so route, model, and request values merge with the usual precedence.

To change or disable them for a provider, set headerTimeout or chunkTimeout under that provider's settings in your project's opencode.jsonc or global ~/.config/opencode/opencode.jsonc:

{
  "providers": {
    "anthropic": {
      "settings": {
        "headerTimeout": 600000,
        "chunkTimeout": false
      }
    }
  }
}

Replace anthropic with your provider. Use a positive number of milliseconds to change a limit, or false to disable it. Omit a setting to use the five-minute default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant