fix(provider): ignore SSE comment heartbeats for chunk timeout - #43607
Open
1052326311 wants to merge 1 commit into
Open
fix(provider): ignore SSE comment heartbeats for chunk timeout#436071052326311 wants to merge 1 commit into
1052326311 wants to merge 1 commit into
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
Current head |
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.
Issue for this PR
Closes #43519
Type of change
What does this PR do?
chunkTimeoutcurrently restarts for every response body read. SSE comment frames such as: keepalivetherefore prevent an otherwise stalled model stream from timing out. This keeps one deadline across reads and resets it only after a complete SSE event containingdata:. 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?
b155b15694dbcc6768f11d2f25cc2bdd1f738ab4to headb9234e31edc25d9f1334b27aaf9b4dd9c918484f: one commit and only the provider wrapper plus its existing test file changed.dev.wrapSSEfunction extracted from its Git blob against a loopback SSE server: after one data event and ongoing 20 ms comment heartbeats, its 50 ms deadline raisedSSE read timed out.Provider.getLanguage()andstreamText()in CI.Screenshots / recordings
Not a UI change.
Checklist