fix(session): retry flattened overload errors - #38531
Closed
samiralibabic wants to merge 1 commit into
Closed
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found a related PR: Related PR:
No duplicate PRs found (PR #38531 is addressing a specific gap left by the previous fix in #25886, not duplicating it). |
6 tasks
Author
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 #25884
Supersedes #25886 on current
dev: its structured overload case is already handled upstream; this PR covers the remainingError-wrapped and SDK-flattened paths.Type of change
What does this PR do?
OpenAI-compatible overload events can reach session handling in two forms: a JSON payload wrapped in
Error, or the SDK-flattened messageOur servers are currently overloaded....This lets generic
Errorvalues pass through the existing stream parser before theUnknownErrorfallback, and recognizes the specific flattened overload phrase in retry classification. Unrelated errors keep their existing behavior. This covers the remaining current-devgap not handled by the older #25886 patch.How did you verify your code works?
bun test test/session/message-v2.test.ts test/session/retry.test.ts(72 passed)bun typecheckfrompackages/opencodebun turbo typecheckgit diff --checkScreenshots / recordings
N/A. This is not a UI change.
Checklist