mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
## 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