parseUsageLimitBody
function parseUsageLimitBody(bodyText, now?): RateLimitReset;Defined in: core/src/rate-limit.ts:303
ChatGPT’s codex backend puts the reset IN THE 429 BODY, not the headers:
{"error":{"type":"usage_limit_reached","resets_at":1788801754,"resets_in_seconds":2501465}}.
Other providers and gateways (LiteLLM, Cloudflare, Ollama) report countdowns in prose:
Rate limit exceeded. Try again in 20s.
The window name is inferred from the wait itself, and only past the floor
above. A sub-minute retry is a throttle, not a subscription window.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bodyText |
string |
now |
number |