-
Stefy Lanza (nextime / spora ) authored
Add is_provider_disabled_cheap() so the rotation scan can skip providers that are disabled — manually via the dashboard toggle or by an auto-disable cooldown — without constructing the handler. Building a handler validates credentials, which for some provider types performs a network round-trip, so a disabled provider was still being contacted. The cheap pre-check reads the same cache/DB keys as is_rate_limited() and fails safe, leaving the authoritative check in place. Also stop recording a failure for non-retryable errors (400/401/403/404/422). Those are client/configuration problems, not provider-health problems: counting them tripped the consecutive-failure auto-disable and pulled healthy providers out of rotation for the whole cooldown. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2f3cbf0e