Repository navigation
Fix retry classification for throttling and quota errors - #45602
Merged
copyberry[bot] merged 1 commit intoSep 15, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why `slow_down` errors were treated as terminal server overloads, while exhausted credit balances and spend limits fell through to retryable stream errors. ## What changed - Classify `slow_down` as a retryable rate limit in HTTP 503 responses and SSE failures, preserving the server message and parsing retry delays from SSE error messages. - Map `credit_balance_exhausted`, `organization_spend_limit_exceeded`, and `project_spend_limit_exceeded` SSE errors to quota exhaustion so they terminate without retries. ## Testing Extend tests to cover HTTP error classification and retryability, `slow_down` stream retry exhaustion and message-provided delays, and a single `UsageLimitExceeded` error with no retries for each quota error code. GitOrigin-RevId: 7985eba71ba4a6fe897a45957e448fadd42f3963
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/7985eba71ba4a6fe897a45957e448fadd42f3963
branch
from
September 15, 2026 04:20
ad312c0 to
31ffe2b
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/7985eba71ba4a6fe897a45957e448fadd42f3963
branch
September 15, 2026 04:20
dongyuehliu
temporarily deployed
to
issue-triage
September 15, 2026 04:21 — with
GitHub Actions
Inactive
dongyuehliu
temporarily deployed
to
issue-triage
September 15, 2026 04:21 — with
GitHub Actions
Inactive
dongyuehliu
temporarily deployed
to
issue-triage
September 15, 2026 04:21 — with
GitHub Actions
Inactive
mattiika69
temporarily deployed
to
issue-triage
September 15, 2026 04:24 — with
GitHub Actions
Inactive
mattiika69
temporarily deployed
to
issue-triage
September 15, 2026 04:24 — with
GitHub Actions
Inactive
mattiika69
temporarily deployed
to
issue-triage
September 15, 2026 04:24 — with
GitHub Actions
Inactive
busonami0118-ai
temporarily deployed
to
issue-triage
September 15, 2026 04:39 — with
GitHub Actions
Inactive
busonami0118-ai
temporarily deployed
to
issue-triage
September 15, 2026 04:39 — with
GitHub Actions
Inactive
busonami0118-ai
temporarily deployed
to
issue-triage
September 15, 2026 04:39 — with
GitHub Actions
Inactive
tomforce3337
temporarily deployed
to
issue-triage
September 15, 2026 04:53 — with
GitHub Actions
Inactive
tomforce3337
temporarily deployed
to
issue-triage
September 15, 2026 04:53 — with
GitHub Actions
Inactive
tomforce3337
temporarily deployed
to
issue-triage
September 15, 2026 04:53 — with
GitHub Actions
Inactive
tomforce3337
temporarily deployed
to
issue-triage
September 15, 2026 04:54 — with
GitHub Actions
Inactive
applepig
temporarily deployed
to
issue-triage
September 15, 2026 05:07 — with
GitHub Actions
Inactive
applepig
temporarily deployed
to
issue-triage
September 15, 2026 05:07 — with
GitHub Actions
Inactive
applepig
temporarily deployed
to
issue-triage
September 15, 2026 05:07 — with
GitHub Actions
Inactive
applepig
temporarily deployed
to
issue-triage
September 15, 2026 05:08 — with
GitHub Actions
Inactive
area46006
temporarily deployed
to
issue-triage
September 15, 2026 05:27 — with
GitHub Actions
Inactive
area46006
temporarily deployed
to
issue-triage
September 15, 2026 05:27 — with
GitHub Actions
Inactive
area46006
temporarily deployed
to
issue-triage
September 15, 2026 05:27 — with
GitHub Actions
Inactive
area46006
temporarily deployed
to
issue-triage
September 15, 2026 05:27 — with
GitHub Actions
Inactive
area46006
temporarily deployed
to
issue-triage
September 15, 2026 05:27 — with
GitHub Actions
Inactive
area46006
temporarily deployed
to
issue-triage
September 15, 2026 05:27 — with
GitHub Actions
Inactive
Azukali
temporarily deployed
to
issue-triage
September 15, 2026 05:34 — with
GitHub Actions
Inactive
Azukali
temporarily deployed
to
issue-triage
September 15, 2026 05:34 — with
GitHub Actions
Inactive
Azukali
temporarily deployed
to
issue-triage
September 15, 2026 05:34 — with
GitHub Actions
Inactive
This branch was previously 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.
Fix retry classification for throttling and quota errors
Why
slow_downerrors were treated as terminal server overloads, while exhausted credit balances and spend limits fell through to retryable stream errors.What changed
slow_downas a retryable rate limit in HTTP 503 responses and SSE failures, preserving the server message and parsing retry delays from SSE error messages.credit_balance_exhausted,organization_spend_limit_exceeded, andproject_spend_limit_exceededSSE errors to quota exhaustion so they terminate without retries.Testing
Extend tests to cover HTTP error classification and retryability,
slow_downstream retry exhaustion and message-provided delays, and a singleUsageLimitExceedederror with no retries for each quota error code.