01Rate limits need token awareness
Request count hides a 100-token extraction versus a 100k-token agent turn. Combine request, token, concurrency, and spend budgets. Reserve estimated usage on admission, then reconcile actual input/output/tool cost.
Two tenants each sending ten requests/s may impose very different load if one uses 100-token prompts and the other 100k-token prompts. Add generated length, tool steps, and concurrency to the model. Reserve estimated input/output work and spend on admission, then reconcile actual usage. Bound estimation error with output and step limits rather than accepting unlimited future work.
Apply limits at tenant and shared-fleet levels. A tenant under its quota can still arrive during global overload. Keep interactive and batch classes separate where needed, expose retry timing truthfully, and avoid repeated immediate retries. Admission should reject or defer before scarce compute and memory are committed.
- Separate tenant and global fleet limits
- Expose truthful retry/queue semantics
- Protect high-priority capacity