fix(opencode): default chunk timeout to five minutes - #46890
Merged
Merged
Conversation
6 tasks
logic10492
added a commit
to coding-chimera/chimera
that referenced
this pull request
Sep 17, 2026
Port upstream opencode 4eb29a64f0 (anomalyco/opencode#46890), user-approved behavior change (triage §11 decision #14 / briefing D3): SSE chunk idle timeout now defaults to 300_000 ms for every provider instead of never timing out, so half-dead relay streams stop hanging indefinitely. Set chunkTimeout: false to explicitly disable; the config schema widens to Union(PositiveInt, Literal(false)) mirroring the existing headerTimeout shape, and the schema description documents the new default. The default is applied where the fetch wrapper is built (resolveSDK) and is not written back into provider options. The fork-specific getResponsesTransport path keeps passing the raw configured value (no default), matching its pre-change semantics; upstream has no counterpart surface. b04697366f (headerTimeout default generalized to all providers) is NOT part of this commit: the fork's headerTimeout default remains OpenAI-only (OPENAI_HEADER_TIMEOUT_DEFAULT). Tests: default applied at fetch (signal spy), configured 50ms timeout aborts a stalled SSE body, chunkTimeout:false accepted end-to-end and disables the abort. Upstream-Sha: 4eb29a64f0054672950acf789f2b09487ebfbb20
rossigee
pushed a commit
to rossigee/opencode
that referenced
this pull request
Sep 18, 2026
rldona
pushed a commit
to rldona/FlupCode
that referenced
this pull request
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sets the default timeout between streamed SSE response chunks to five minutes (300,000 ms). Stalled requests are aborted and retried using the existing retry policy. This limits inactivity between chunks, not the total response duration.
To disable it for a provider, set
chunkTimeouttofalsein your project'sopencode.jsonor global~/.config/opencode/opencode.json:{ "provider": { "anthropic": { "options": { "chunkTimeout": false } } } }Replace
anthropicwith your provider. To change the timeout instead, use a positive number of milliseconds, such as"chunkTimeout": 600000for ten minutes. Omit the setting to use the five-minute default.