GPT-5 finding
Health check marks 401/403 as healthy, routing to misconfigured providers
mediumapi-contractmedium
- python/smart_router.py
Treating 401/403 as healthy makes the router select providers with invalid credentials, leading to predictable request failures and retries instead of excluding them from the pool until credentials are valid.
Recommendation
Only mark healthy on 200. Optionally track a separate 'reachable' flag for debuggability while excluding unauthorized providers from selection. Alternatively, heavily penalize score on 401/403 or mark unhealthy until recheck.