Skip to content

fix: time out non-SSE streams - #39516

Open
Davide95 wants to merge 1 commit into
anomalyco:devfrom
Davide95:stream-timeout
Open

fix: time out non-SSE streams#39516
Davide95 wants to merge 1 commit into
anomalyco:devfrom
Davide95:stream-timeout

Conversation

@Davide95

@Davide95Davide95 commented Jul 29, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes#31122

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Makes the existing opt-in chunkTimeout wrap every streamed response body rather than only text/event-stream responses. This detects stalled EventStream and other non-SSE provider streams without reintroducing the global timeout that caused false positives for slow models.

How did you verify your code works?

  • Added tests to cover it
  • Tested locally, and the issue seems gone
  • 4 people tried it for ~24 hours, and they confirmed the bug is fixed

Screenshots / recordings

N/A

Checklist

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

🤖 Generated with [OpenCode](https://opencode.ai) (GPT-5)
@github-actionsgithub-actionsBot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 29, 2026
@Davide95Davide95 changed the title fix(provider): time out non-SSE streamsfix: time out non-SSE streamsJul 29, 2026
@github-actionsgithub-actionsBot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@rock-solid-sites

Copy link
Copy Markdown

Controlled reproduction added to issue #26487 confirms the proposed approach; it also covers the application/json case — a non-SSE response bypasses chunkTimeout entirely and hangs with zero errors. See the table in the #26487 comment.

Sign up for freeto 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.

OMO Harness Stream Consumer Deadlock: LLM stream hangs indefinitely

2 participants

@Davide95@rock-solid-sites