Design a retry strategy for an asynchronous AI generation client.
Retry only transient failures such as timeouts, 429s, and selected 5xx responses. Use capped exponential backoff with jitter, honor Retry-After, preserve an idempotency key, and log the request ID so exhausted attempts remain traceable.