• Stefy Lanza (nextime / spora )'s avatar
    Stop the manual-disable flag from evicting providers from rotations · 205f6d7f
    Stefy Lanza (nextime / spora ) authored
    A provider carrying the legacy global manual-disable flag was permanently
    evicted from every rotation it belonged to, and clients saw an upstream 429.
    Observed in production on rotation/lisa: codex had valid credentials and was
    never once called upstream all day.
    
    Two independent defects combined:
    
    1. is_rate_limited() honoured the manual flag, so every provider's
       handle_request() raised Exception("Provider rate limited") before any
       upstream call. The rotation scan deliberately ignores that flag, so the
       provider was still selected, and the synthetic error was then counted
       against its health — three of them armed a real failure cooldown. This
       contradicted the behaviour already documented in handlers.py: the flag
       gates nothing, neither direct calls nor rotation. Rotation membership is
       expressed per entry via `enabled: false`.
    
    2. The rotation retry loop fed a provider's own availability-gate error into
       record_failure(), pushing disabled_until another full cooldown into the
       future on every attempt. Under steady traffic the cooldown could never
       elapse: the failure counter reached 447 against a threshold of 3, with no
       reactivation in any retained log.
    
    is_rate_limited() is now cooldown-only; use is_manually_disabled() when the
    manual flag is what you actually want. The dashboard already reports the two
    states separately, so the toggle is unaffected.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    205f6d7f
Name
Last commit
Last update
aisbf Loading commit data...
config Loading commit data...
docs Loading commit data...
static Loading commit data...
templates Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
API_EXAMPLES.md Loading commit data...
BUILD_DEPLOY.md Loading commit data...
CHANGELOG.md Loading commit data...
DEBUG_GUIDE.md Loading commit data...
DOCUMENTATION.md Loading commit data...
ENDPOINTS.md Loading commit data...
KILO_OAUTH2.md Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
MISSING_ENDPOINTS.md Loading commit data...
PYPI.md Loading commit data...
QUICK_START_PAYMENT.md Loading commit data...
README.md Loading commit data...
RUNPOD_IMPLEMENTATION_PLAN.md Loading commit data...
SUBSCRIPTION_PRICING_FEATURE.md Loading commit data...
TODO.md Loading commit data...
TORRC_SETUP.md Loading commit data...
aisbf.sh Loading commit data...
build.sh Loading commit data...
chatgpt-api-implementation-guide.md Loading commit data...
clean.sh Loading commit data...
cli.py Loading commit data...
codex-oauth-implementation-guide.md Loading commit data...
main.py Loading commit data...
main.py.bak Loading commit data...
minio-archive-plan.md Loading commit data...
pyproject.toml Loading commit data...
requirements.txt Loading commit data...
screenshot.png Loading commit data...
setup.py Loading commit data...
start_proxy.sh Loading commit data...
verify_release.sh Loading commit data...