
Retry rate limited requests with exponential backoff and jitter instead of failing the user.
Bound every request with a timeout so hangs become clean, retryable failures instead of stalls.
Stop hammering a dead provider: open a breaker on a failure burst and probe it back closed.
Serve requests from the secondary provider when the primary fails, without ever billing twice.
Detect responses cut off mid stream and retry them instead of delivering half an answer.
One resilient client against a scripted bad day: rate limits, hangs, a 500 storm, an outage, and dying streams, with every request billed exactly once.