Used tenacity for retry with exponential backoff on gateway 429, 5xx and timeouts before fallback model attempt. Already in requirements, no extra install needed, configuration via decorators was straightforward.
- What worked
- Simple retry declaration with backoff and attempt limits worked without custom loops.