Skip to content

fix(provider): enforce chunk timeout regardless of content type - #4

Merged
totalolage merged 1 commit into
devfrom
stream-timeout-fix
Sep 13, 2026
Merged

totalolage merged 1 commit into
devfrom
stream-timeout-fix

Conversation

@totalolage

Copy link
Copy Markdown
Owner

Issue for this PR

Upstream PR: anomalyco#47621
Upstream issue: anomalyco#47605

Type of change

  • Bug fix

What does this PR do?

Bring the upstream timeout fix into our fork so we can use it before upstream merges it.

chunkTimeout currently only checks responses marked text/event-stream. If a provider omits or mislabels that header, a stalled response can leave the session waiting indefinitely.

Remove the header check so the existing timeout covers all response bodies through the SDK fetch wrapper, including Bedrock binary streams and JSON. Timeout defaults and opt-outs are unchanged. Native and WebSocket transports are outside this change.

This is the same reviewed commit as the upstream PR: e22295a175b74090549115e0eb02b64af6aefb3e. It merges cleanly with the fork’s CI and self-update changes.

How did you verify your code works?

  • 139 focused tests passed on the fix commit.
  • bun typecheck passed in packages/opencode.
  • Full package suite: 3559 passed, 26 failed, 22 skipped, one todo. All 26 failures also reproduced against the original implementation in the same environment.
  • Independent code review approved the patch.

The full run used a worktree-local TMPDIR after /tmp filled, which affected unrelated tests. A clean-environment full-suite pass remains unverified. These test results are for the fix commit before merging with the fork’s additional changes; fork CI must check the combined result.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@totalolage
totalolage merged commit d57362a into dev Sep 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant