Retries feel like the responsible thing to add to an LLM call. The provider hiccups, you wait half a second, you try again, the user never notices.
That holds right up until the provider is actually down. Then every retry is one more request that will also fail, sent at the exact moment the provider can least take it. In a drill against an offline simulator, I watched 1,000 prompts turn into 16,000 failed provider requests, and all of it came from my own "helpful" code.
Here are the five mistakes that got me there, roughly in the order I made them, plus the skeleton of the fix.
Tech Skill Builder is $5/month for a very limited time only (normally $10). Grab it now before it goes back to $10. Join Tech Skill Builder . The complete, tested retry-budget project from this post is in there.
Building a paid, multi-tenant AI product?…