One correct answer for "should I retry, and exactly when?"
Every client hand-rolls retry logic, and most get it wrong: ignoring Retry-After, hammering a 429, no jitter (thundering herd), or no budget cap. Different APIs use Retry-After, RateLimit-Reset, X-RateLimit-Reset (epoch), and delta-seconds โ inconsistently. This API turns all of it into one decision.
should_retry based on status class and your retry budget.
AWS-style backoff with full / equal / decorrelated jitter.
Retry-After (date or seconds) + every RateLimit-* variant.
Honors server-directed timing over computed backoff.