passdrill
AI & LLM Engineering · Building with LLM APIs · Card 004/012 medium

A client application calling an LLM API in a tight loop starts receiving HTTP 429 responses. What is the generally recommended way to handle this, per common LLM provider API documentation?

  1. Immediately retry the exact same request as fast as possible in a loop, since 429 responses are transient and will resolve within milliseconds if retried aggressively
  2. Switch to a different, unrelated API endpoint entirely, since a 429 on one endpoint indicates that the provider's entire platform is unavailable
  3. Reduce the `max_tokens` parameter on the failing request, since 429 responses indicate the requested output would be too long to generate
  4. Back off and retry after a delay that increases with each subsequent failure (exponential backoff), typically with some added random jitter, rather than retrying immediately or at a fixed short interval
Next card → Shuffle