You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e79ed74
Browse filesBrowse the repository at this point in the historyBrowse files
fix(chat): drop the env knobs and put the ceiling under the plan bucket
Two corrections to the execution throttle.
The per-deployment ceiling was 300/min, at or above the workspace `sync`
counter it debits on every plan but enterprise — 50 free, 150 pro, 300 team.
A flood therefore drained that shared counter, which the owner's API, webhook
and scheduled runs draw from too, before the ceiling ever refused: the
availability half of the report went unmitigated on exactly the plans most
workspaces are on. It is now 60/min sustained, under even the cheapest paid
plan, with a test that pins it there against `RATE_LIMITS`. The per-IP bucket
drops to 30/min so one host cannot take a deployment's whole allowance, and
both gain the 2x burst allowance the plan buckets already use.
Both limits go back to plain constants. Every sibling deployment throttle —
password, OTP, SSO, on chat and on public file shares — is a hardcoded
`TokenBucketConfig`, so the two env vars were the only configurable ones of
their kind and bought speculative tuning for a control with sane defaults.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QWh9WFMYNZ6uTFQFUzF8Bj
DEPLOYMENT_IP_EXECUTIONS_PER_MINUTE: z.string().optional().default('60'),// Executions one client IP may drive against a single deployed chat, billed to that chat's owner
407
-
DEPLOYMENT_EXECUTIONS_PER_MINUTE: z.string().optional().default('300'),// Executions one deployed chat may serve per minute across all callers (owner-spend backstop)
408
406
MANUAL_EXECUTION_LIMIT: z.string().optional().default('999999'),// Manual execution bypass value (effectively unlimited)
409
407
RATE_LIMIT_FREE_SYNC: z.string().optional(),// Free tier sync API executions per minute (default 50). With billing disabled, setting it explicitly opts into rate limiting
410
408
RATE_LIMIT_FREE_ASYNC: z.string().optional(),// Free tier async API executions per minute (default 200). With billing disabled, setting it explicitly opts into rate limiting
0 commit comments