• 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
..
admin_market.html Loading commit data...
admin_payment_settings.html Loading commit data...
admin_tier_form.html Loading commit data...
admin_tiers.html Loading commit data...
analytics.html Loading commit data...
autoselect.html Loading commit data...
billing.html Loading commit data...
cache_settings.html Loading commit data...
change_email.html Loading commit data...
change_password.html Loading commit data...
delete_account.html Loading commit data...
docs.html Loading commit data...
edit_config.html Loading commit data...
error.html Loading commit data...
forgot_password.html Loading commit data...
index.html Loading commit data...
login.html Loading commit data...
market.html Loading commit data...
paypal_connect.html Loading commit data...
pricing.html Loading commit data...
profile.html Loading commit data...
prompt_analytics.html Loading commit data...
prompts.html Loading commit data...
provider_quotas.html Loading commit data...
providers.html Loading commit data...
rate_limits.html Loading commit data...
reset_password.html Loading commit data...
response_cache.html Loading commit data...
rotations.html Loading commit data...
settings.html Loading commit data...
signup.html Loading commit data...
studio.html Loading commit data...
subscription.html Loading commit data...
traffic_visits.html Loading commit data...
usage.html Loading commit data...
user_autoselects.html Loading commit data...
user_index.html Loading commit data...
user_providers.html Loading commit data...
user_rotations.html Loading commit data...
user_tokens.html Loading commit data...
users.html Loading commit data...
verify.html Loading commit data...
wallet.html Loading commit data...