Zum Hauptinhalt springen

AI daily token budget

Generated from mcp/patterns.registry.json — do not edit by hand; change the registry and run bun 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 · 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 mcp/patterns.registry.json.

← Back to Pattern Library

Geht dieses Pattern noch besser? Sag uns, wie.

Feedback geben