451ebb3e22
The Reddit search uses OpenAI's Responses API with web_search, which frequently returns 429 rate limit errors. The previous retry logic used linear backoff (1s, 2s, 3s) which is too aggressive for OpenAI's rate limiter (often needs 10-60s waits). Changes: - Increase max retries from 3 to 5 - Switch from linear to exponential backoff (2s, 5s, 9s, 17s, 33s) - Parse and respect Retry-After header from OpenAI 429 responses - Fall back to cheaper models (gpt-4.1 → gpt-4o) on 429s, not just on 400/403 access errors - Remove gpt-4o-mini from fallback chain — it doesn't support web_search with the filters parameter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>