Skip to content

fix(provider): ignore SSE comment heartbeats for chunk timeout - #43607

Open
1052326311 wants to merge 1 commit into
anomalyco:devfrom
1052326311:fix/43519-sse-comment-timeout
Open

fix(provider): ignore SSE comment heartbeats for chunk timeout#43607
1052326311 wants to merge 1 commit into
anomalyco:devfrom
1052326311:fix/43519-sse-comment-timeout

Conversation

@1052326311

@1052326311 1052326311 commented Aug 20, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #43519

Type of change

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

What does this PR do?

chunkTimeout currently restarts for every response body read. SSE comment frames such as : keepalive therefore prevent an otherwise stalled model stream from timing out. This keeps one deadline across reads and resets it only after a complete SSE event containing data:. It leaves header timeouts and non-SSE responses unchanged.

The regression starts the existing loopback OpenAI-compatible test server with one data event followed by comment heartbeats every 20 ms. With a 50 ms chunkTimeout, the stream must produce the existing typed response-stream error.

How did you verify your code works?

  • Compared exact base b155b15694dbcc6768f11d2f25cc2bdd1f738ab4 to head b9234e31edc25d9f1334b27aaf9b4dd9c918484f: one commit and only the provider wrapper plus its existing test file changed.
  • Reviewed exact generated source and test blobs against dev.
  • Executed the exact candidate wrapSSE function extracted from its Git blob against a loopback SSE server: after one data event and ongoing 20 ms comment heartbeats, its 50 ms deadline raised SSE read timed out.
  • The normal local checkout cannot execute the repository test because ordinary source reads and Git fetches hang in this environment. The added repository regression covers the same flow through Provider.getLanguage() and streamText() in CI.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested the exact candidate timeout logic locally with a loopback SSE server
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@1052326311

Copy link
Copy Markdown
Author

Current head b9234e31edc25d9f1334b27aaf9b4dd9c918484f is mergeable and the repository duplicate, standards, and compliance checks are green. The loopback SSE regression exercises the provider boundary without external credentials. Please review this exact head.

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.

chunkTimeout resets on SSE comment heartbeats — keepalive-warm stalled streams never time out

1 participant