parseRateLimitReset
function parseRateLimitReset(headers, now?): RateLimitReset;Defined in: core/src/rate-limit.ts:180
Parse the rate-limit headers off a (usually 429) response.
Anthropic’s anthropic-ratelimit-unified-* pair rides on every OAuth
response, so both windows are always reported and only one of them is the
reason for this 429. API-key accounts get the anthropic-ratelimit-*-reset
RFC 3339 timestamps instead. Everything is optional: an unrecognized shape
yields an empty result, and the caller falls back to its generic message.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
headers |
Headers |
now |
number |