• Stefy Lanza (nextime / spora )'s avatar
    Per-provider client rate limit, dashboard-editable (v0.99.95) · 502c7e74
    Stefy Lanza (nextime / spora ) authored
    Adds a configurable global cap (all clients combined) on requests forwarded to a
    given provider, so a hammering client can be throttled per provider — e.g. cap
    kilo-spora so the real-estate app can't exhaust kilo's per-IP free-model quota
    (which was cascading into 429s for other kilo providers like kilo-stefy and
    breaking the lisa rotation).
    
    - config.py: ProviderConfig gains client_rate_limit_rpm / client_rate_limit_rph
      (0 = unlimited). Persists via the existing provider-save path.
    - handlers.py: a sliding-window limiter keyed provider:<id>:<window>, enforced at
      all six client entry points (chat, streaming, transcription, TTS, image,
      embeddings) right before the availability gate — excess requests get HTTP 429 +
      Retry-After without building the handler or calling upstream.
    - providers.html / user_providers.html: a "Rate Limiting" section with per-minute
      and per-hour inputs (0 = unlimited) in each provider's edit form.
    
    Counts direct requests to a provider; rotation-internal dispatch is not counted
    in this version.
    Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
    502c7e74
Name
Last commit
Last update
..
app Loading commit data...
auth Loading commit data...
payments Loading commit data...
providers Loading commit data...
routes Loading commit data...
__init__.py Loading commit data...
aisbf.sh Loading commit data...
analytics.py Loading commit data...
batching.py Loading commit data...
cache.py Loading commit data...
classifier.py Loading commit data...
coderai_broker.py Loading commit data...
coderai_registry.py Loading commit data...
config.py Loading commit data...
context.py Loading commit data...
cost_extractor.py Loading commit data...
database.py Loading commit data...
email_utils.py Loading commit data...
geolocation.py Loading commit data...
handlers.py Loading commit data...
mcp.py Loading commit data...
models.py Loading commit data...
prompt_analysis.py Loading commit data...
streaming_optimization.py Loading commit data...
studio.py Loading commit data...
studio_adapters.py Loading commit data...
studio_services.py Loading commit data...
tor.py Loading commit data...
utils.py Loading commit data...