Skip to content

fix(ai): raise default chunk timeout to fifteen minutes - #55032

Merged
rekram1-node merged 1 commit into
devfrom
body-timeout
Oct 13, 2026
Merged

rekram1-node merged 1 commit into
devfrom
body-timeout

Conversation

@rekram1-node

@rekram1-node rekram1-node commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

Some model providers have specifically asked that clients wait at least 15 minutes for streamed response data, DeepSeek for example. Reasoning models can send no visible output for minutes while they think, and our 5-minute chunkTimeout default cuts those responses off before the model is done.

Change

  • chunkTimeout now defaults to 15 minutes (900_000 ms), in both places that apply it:
    • @opencode/ai's HTTP transport: the new DEFAULT_CHUNK_TIMEOUT_MS in packages/ai/src/schema/options.ts.
    • Core's provider settings: DEFAULT_CHUNK_TIMEOUT_MS in packages/core/src/provider.ts.
  • headerTimeout stays at 5 minutes. Streaming responses send headers early, so the long silences happen in the body.
  • The WebSocket transport already has a 30-minute idle timeout, so it's unchanged.
  • An explicit chunkTimeout in provider config still overrides the default, and false still disables it.
  • The chunkTimeout line in the English config docs now says 15 minutes.

Verification

  • packages/ai/test/http-timeout.test.ts now expects a stalled body to fail at 15 minutes. It fails if the default changes.
  • bun run check passes, along with the full packages/ai suite and the core provider, AI SDK, config and model-transport tests.

Added by the opencode bot (AI-generated).

Related: #54865

Public API: changes the default provider chunkTimeout from 300000 to 900000 ms (backwards compatible)

@rekram1-node
rekram1-node merged commit d8129ca into dev Oct 13, 2026
9 of 11 checks passed
@rekram1-node
rekram1-node deleted the body-timeout branch October 13, 2026 05:03

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. In @opencode/ai's HTTP transport, a stalled body now times out at 15 minutes and not before: at 14 minutes the request was still waiting. Core's AI SDK path picks up the same default from Provider.timeouts(). Header timeout, whole-request timeout, the WebSocket idle timeout and explicit or false overrides are unchanged. The packages/ai suite, the related packages/core tests and both packages' typecheck pass.

Public API: no keys or schemas change. Only the default of the provider chunkTimeout setting goes from 300000 to 900000 ms. That's backwards compatible: configs that set it explicitly behave the same.

Related: #54865

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