Repository navigation
Honor server retry advice across Responses retries and fallback - #49441
Merged
copyberry[bot] merged 1 commit intoSep 30, 2026
Conversation
## Why Responses overload and exhausted-request errors could terminate despite server retry advice, and WebSocket-to-HTTP fallback could issue a request before the advised deadline. ## What changed - Allow `ServerOverloaded` and `RetryLimit` errors to retry when server advice is present, within the configured retry budgets. - Preserve `Retry-After` headers from rejected WebSocket upgrades and wait for the server deadline before falling back to HTTP. - Keep quota, usage-limit, and policy failures terminal even when they include retry advice. ## Testing Add coverage for HTTP overload and rate-limit recovery, WebSocket upgrade rejection and fallback timing, retry deadline preservation through error mapping, and retry limits for sampling and manual and automatic compaction. GitOrigin-RevId: 72d30a9f078652664754dfa971fd7dc7a78f20e8
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/72d30a9f078652664754dfa971fd7dc7a78f20e8
branch
from
September 30, 2026 02:12
76012c8 to
6ba4bf9
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/72d30a9f078652664754dfa971fd7dc7a78f20e8
branch
September 30, 2026 02:12
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Honor server retry advice across Responses retries and fallback
Why
Responses overload and exhausted-request errors could terminate despite server retry advice, and WebSocket-to-HTTP fallback could issue a request before the advised deadline.
What changed
ServerOverloadedandRetryLimiterrors to retry when server advice is present, within the configured retry budgets.Retry-Afterheaders from rejected WebSocket upgrades and wait for the server deadline before falling back to HTTP.Testing
Add coverage for HTTP overload and rate-limit recovery, WebSocket upgrade rejection and fallback timing, retry deadline preservation through error mapping, and retry limits for sampling and manual and automatic compaction.