Four shorter follow-ups come up too: limits over short spans, pacing from the headers, Redis replicas, and separate workspaces.
Limits apply over shorter spans than a minute
Anthropic's docs warn that 60 requests a minute might be enforced as 1 a second.
Predict
A nightly job is allowed 60 requests a minute and sends all 60 in the first second. If the limit is enforced as 1 a second, what happens?
So spread your own calls evenly.
Pace your own calls from the headers
Anthropic's token headers show the most restrictive limit in effect, and OpenAI's x-ratelimit-remaining-tokens shows the tokens left before the limit. Slow down as they fall instead of waiting for a 429. Retries with backoff and jitter are in the batch-inference lesson.
Read the bucket from the primary
GitHub found that Redis replicas don't expire data until their primary tells them to, and primaries don't expire keys until they're accessed. A bucket read from a replica can be stale, so read and write each bucket on the primary.
Separate the teams
Anthropic lets you set spend and rate limits for each workspace in an organization. Put the nightly job in its own workspace with its own cap, so it can never take the limit chat depends on.