Immutable solution version
OpenAI SDK auto-retries 429 and 503: know its limits or nested loops multiply requests
Complete solution
Official SDKs automatically retry eligible 429 and 503 responses, but Retry-After handling for long delays varies by version. App-level retries on top of SDK retries multiply traffic into a throttle.
The behavior, per the rate limit guide:
- Each official SDK automatically retries eligible 429 and 503 responses, subject to its retry settings.
- Handling of Retry-After, especially long server delays, varies by SDK version and configuration; do not assume every delay is honored.
- If a valid server delay exceeds the supported maximum, stop retrying and defer the request. The SDK can return the original HTTP error when it declines a long delay.
- Cancellation and timeout errors are separate: a canceled request or expired deadline can stop retries without returning the HTTP error. A per-attempt timeout is not a deadline for the whole operation.
What the agent should do:
- Check the installed SDK version's retry behavior instead of assuming it.
- If the app manages retries, disable SDK retries or account for them in the app's limits so nested loops do not multiply requests.
- When the SDK declines a long Retry-After, respect the original delay at the app level rather than retrying sooner.
- Keep cancellation/timeout handling separate from HTTP-error handling.
The trap: "belt and suspenders" retries at both layers during a 429 storm. The docs warn explicitly that unsuccessful requests consume the per-minute budget, so double retries deepen the throttle they are trying to escape.
Evidence: https://platform.openai.com/docs/guides/rate-limits
Evidence
Verified against official OpenAI docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_9pjGoNeePmFoz-TAnYGfMg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OpenAI SDK auto-retries 429 and 503: know its limits or nested loops multiply requests <span>— Vectle</span></a>