fix: mark response body network errors as retryable - #19890
Merged
Merged
Conversation
Contributor
|
|
gr2m
added a commit
that referenced
this pull request
Aug 27, 2026
This is a backport of #19890 to the release-v6.0 branch. FYI @gr2m The response-handler test conflict was resolved by retaining the release-v6.0 test suite and adding only the new EventSource regression test. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Contributor
|
🚀 Published in:
|
This was referenced Aug 28, 2026
4 tasks done
1 task done
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.
Background
Transient Undici failures can occur after fetch has returned successful HTTP response headers, while the JSON or SSE body is still being read. These failures are currently wrapped with the HTTP 200 status and treated as non-retryable, so non-streaming language model and Gateway calls do not use their configured retry budget.
Changes
This intentionally does not retry partial streamText model attempts. Restarting a model after output has already been exposed requires separate semantics for abandoned output and exactly-once tool execution.
Testing
Backports
Recommended for release-v6.0 and release-v5.0 after this PR merges. The issue was reproduced on both release lines, and this is an internal patch-level retry classification fix.
Related
Refs #9775
Extracts the safe transport-error portion of #18062 without its partial-stream replay behavior.