AI daily token budget
Generated from
pattern-library/registry.json— do not edit by hand; change the registry and runbun run patterns:build.
Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.
Category: Anti-Abuse · Tier: light · Maturity: proven (verified 2026-08-20 @ 1a130d67) · Risk: medium — governs AI cost exposure; misconfiguration can allow spend amplification
A per-user daily token cap stored in Redis that prevents a single authenticated user from exhausting AI quota through cost-amplification abuse.
When to use: Apply it to any AI-backed feature where per-user spend must be bounded before a request is served.
Docs
Code
Proof
Machine-readable record: anti-abuse-ai-budget in pattern-library/registry.json.