Purpose
Keep AI spend predictable and attributable through budgets, caching, model routing, quota enforcement, and abuse prevention.
Mandatory checks
Gate controls. Each check is pass/fail via artifact + pass condition. Expected from the annotated capability level when the system meets the minimum criticality tier.
Production AI workloads shall enforce finite hard spend ceilings and/or request rate limits (provider, gateway, or application) that deny or throttle when exceeded—not soft dashboards or prompt-only budgets alone.
- Artifact
- Gateway/provider/application config declaring finite spend ceiling and/or rate limit (TPM/RPM/$, tokens) + Enforcement evidence: automated exceed test or ≤90-day production deny/throttle event log
- Pass condition
- A finite hard spend ceiling and/or rate limit is configured for production AI workloads; enforcement demonstrably denies or throttles when the limit is exceeded (automated test or production event log measuredAt ≤90 days). If no production AI/model/agent traffic exists, score NOT_APPLICABLE.
Why this control exists
Threat mapCap the financial and capacity impact of abusive or runaway AI usage.
Threats mitigated
Denial of WalletDenial of ServiceExcessive AgencyProtects
CostAvailabilityRuntimeMITRE: ATLAS AML.T0034 · ATLAS AML.T0034.000 · ATLAS AML.T0034.001 · ATLAS AML.T0034.002 · ATLAS AML.T0029
Cost-harvesting attacks work by driving billable inference volume against a system with no hard ceiling. Enforced spend and rate limits bound the loss from excessive, resource-intensive, and agentic consumption, and stop one workload from exhausting shared capacity.
Informative threat context — mappings reduce exposure and do not guarantee mitigation; not certification.
Production AI spend shall be monitored with alert policies for budget burn and spend anomaly that notify operators per runbook—not dashboards alone.
- Artifact
- Cost/spend dashboard or telemetry views covering production AI workloads + Alert policies for budget burn and spend anomaly (IaC, provider, or gateway) + Notify proof: alert test or documented fire ≤90 days with page/notify outcome
- Pass condition
- Alerts exist for both budget burn and spend anomaly covering production AI spend; a synthetic or historical burn/anomaly event would page/notify per runbook (alert test or documented fire measuredAt ≤90 days). If no production AI spend exists, score NOT_APPLICABLE.
Why this control exists
Threat mapDetect abnormal AI spend early enough to intervene.
Threats mitigated
Denial of WalletDenial of ServiceProtects
CostAvailabilityMITRE: ATLAS AML.T0034 · ATLAS AML.T0034.000
Cost anomalies are frequently the first observable signal of automated abuse or a runaway agent loop. Alerting on burn rate shortens the gap between onset and containment; it complements rather than replaces the hard limits in COST-M1.
Informative threat context — mappings reduce exposure and do not guarantee mitigation; not certification.
Production AI clients shall enforce finite retry/backoff and loop budgets so forced failures cannot amplify completions without bound—covering HTTP/SDK clients and agent loops, not prompt-only “try again” guidance.
- Artifact
- Retry/backoff config (finite maxRetries + backoff) for production AI/model clients + Agent or client loop budget config where applicable (finite iterations/steps) + Amplification test results: forced failure/retry hits a bounded token or $ ceiling (≤90 days)
- Pass condition
- Max retries and max agent/client loops are finite for 100% of production AI clients; amplification tests show cost cannot grow without bound under forced failure/retry (bounded token or $ ceiling; test measuredAt ≤90 days). If no production AI/model clients exist, score NOT_APPLICABLE.
Why this control exists
Threat mapPrevent retry and loop logic from amplifying a single request into unbounded cost.
Threats mitigated
Denial of WalletDenial of ServiceExcessive AgencyProtects
CostAvailabilityRuntimeMITRE: ATLAS AML.T0034.001 · ATLAS AML.T0034.002 · ATLAS AML.T0029
Unbounded retries and agent loops multiply the cost of every failure and can be triggered deliberately by an attacker who induces failures. Bounded policies cap the amplification factor available to both an adversary and a defect.
Informative threat context — mappings reduce exposure and do not guarantee mitigation; not certification.
Evidence required
- Enforce-on-exceed deny/throttle evidence (≤90 days)
- Hard spend/rate limit config for production AI workloads
- Budget and quota configuration
- Cost dashboards and alert policies
- Documented retry/loop limits
Recommended checks
Strengthen posture beyond the gate. Same measurable structure; non-blocking unless elevated by organizational policy.
Production AI systems should cache prompt/response results for documented idempotent or repeated paths, with explicit exclusions for sensitive or personalized prompts, and report hit-rate and savings for ≥30 days.
- Artifact
- Prompt/response cache config naming idempotent paths and safety exclusions + Hit-rate and savings report covering ≥30 days (import or dashboard export)
- Pass condition
- Cache is enabled for documented idempotent/repeated prompt paths; sensitive/personalized prompts are excluded; hit-rate and savings are reported for a window of ≥30 days (report measuredAt within the last 90 days). If no production AI traffic with potentially cacheable prompts exists, score NOT_APPLICABLE.
Why this control exists
Threat mapReduce the cost and capacity impact of repeated identical requests.
Threats mitigated
Denial of WalletDenial of ServiceProtects
CostAvailabilityMITRE: ATLAS AML.T0034.000
Caching absorbs high-volume repeated queries that would otherwise bill and consume capacity on every call. Shared caches must respect tenancy, or the control itself becomes a cross-tenant disclosure path.
Informative threat context — mappings reduce exposure and do not guarantee mitigation; not certification.
Production AI systems should route documented low-risk task classes to cheaper models by default, with eval coverage proving quality within tolerance of a premium baseline and misroute rate monitored ≤30 days.
- Artifact
- Model-routing policy mapping low-risk task classes to cheap vs premium models + Eval coverage report for low-risk routed tasks vs premium baseline + Misroute-rate monitoring evidence covering ≤30 days
- Pass condition
- Documented low-risk task classes route to cheaper models by default; eval shows quality within tolerance versus a premium baseline; misroute rate is monitored for a window of ≤30 days (report measuredAt within the last 90 days). If a single fixed model with no routing surface, score NOT_APPLICABLE.
Why this control exists
Threat mapReduce unit cost without silently degrading quality on low-risk tasks.
Threats mitigated
Denial of WalletMisinformationProtects
CostUsersMITRE: no technique mapped — this control addresses governance or assurance rather than a specific adversary technique.
Routing to cheaper models saves money only if the cheaper path is evaluated to the same bar for the tasks it serves. This is an economic control; no adversary technique maps.
Informative threat context — mappings reduce exposure and do not guarantee mitigation; not certification.
Each customer-facing AI product should publish unit-cost metrics (e.g. cost per successful task or journey) for the last quarter and undergo a FinOps review ≤90 days with named owners for outliers above documented thresholds.
- Artifact
- Per-product AI unit-economics report (cost per successful task / journey) for the last quarter + FinOps review minutes ≤90 days with outlier owners and thresholds
- Pass condition
- Each customer-facing AI product has unit-cost metrics for the last quarter; a FinOps review occurred within the last 90 days with named owners for outliers above documented thresholds (review measuredAt ≤90 days). If no customer-facing AI products exist, score NOT_APPLICABLE.
Why this control exists
Threat mapKeep AI unit economics under periodic review so structural cost drift is caught.
Threats mitigated
Denial of WalletProtects
CostMITRE: no technique mapped — this control addresses governance or assurance rather than a specific adversary technique.
Per-request alerting catches spikes but not the slow drift in cost per unit of value delivered. Periodic FinOps review addresses that; no adversary technique maps.
Informative threat context — mappings reduce exposure and do not guarantee mitigation; not certification.
More detailPhilosophy, failures, practices, validations, examples, crosswalks, and evolution
Engineering philosophy
Cost is a reliability and security property. Unbounded token spend is a denial-of-wallet attack surface and a business continuity risk.
Why it matters
Agent loops, recursive tool use, and prompt bloat can create sudden five-figure bills. Without controls, AI features become financially unsafe to operate.
Common failures
- No per-tenant or per-feature budgets
- Retry storms that multiply completions
- Sending huge contexts when retrieval would suffice
- Using frontier models for trivial classification tasks
- Soft cost dashboards without enforce-on-exceed
- CI concurrency or generic HTTP limits mistaken for AI spend ceilings
- Cost dashboards without budget-burn or anomaly alert policies
- Alert definitions with no proven page/notify path
- Unbounded maxRetries or missing backoff on AI/model clients
- Relying on AGN-M2 alone while non-agent clients retry without bound
- Cache library present without enabled idempotent paths or safety exclusions
- No hit-rate/savings report for ≥30 days
- All traffic on frontier models with no low-risk task-class routing
- Cheap routing without eval coverage or misroute monitoring
- Aggregate spend dashboards without per-product unit-cost metrics
- FinOps reviews without named owners for cost outliers
Severity & risk
- Severity
- high
- Impact if violated
- Risk level
- high
- Typical residual risk (impact × likelihood)
Engineering best practices
- Attribute cost to tenant and feature tags
- Prefer embeddings + retrieval over stuffing large corpora
- Set timeouts on model and tool calls
- Load-test cost under adversarial long prompts
Automatic validations
- Gateway enforcement of quotas
- Anomaly detection on token spend
- CI checks estimating token cost of prompt changes
- Repo spend/rate-limit config heuristics (ai-spend-limits collector)
- Imported enforce-on-exceed suite under imports/ai-spend-limits/
- Repo budget-burn / spend-anomaly alert heuristics (ai-cost-alerts collector)
- Imported notify proof under imports/ai-cost-alerts/
- Repo retry/loop budget heuristics (ai-retry-amplification collector)
- Imported amplification suite under imports/ai-retry-amplification/
- Repo prompt-cache heuristics (ai-prompt-cache collector)
- Imported ≥30-day hit-rate/savings under imports/ai-prompt-cache/
- Repo model-routing heuristics (ai-model-routing collector)
- Imported eval + misroute suite under imports/ai-model-routing/
- Repo FinOps/unit-economics heuristics (ai-finops-unit-economics collector)
- Imported quarterly metrics + review under imports/ai-finops-unit-economics/
Manual validations
- Quarterly cost architecture review
- Abuse scenario walkthroughs
Examples
- A free-tier chatbot hard-stops after N tokens/day per user
- An agent aborts when projected step cost exceeds remaining budget
References
Crosswalks
§6 Planning
ISO/IEC 42001 · partial
LLM10 Unbounded Consumption
OWASP Top 10 for Large Language Model Applications · supports
C9.1 Execution Budgets, Loop Control, and Circuit Breakers
OWASP AI Application Security Verification Standard (AISVS) · supports
Cost Optimization Cost Optimization
AWS Well-Architected Framework · supports
Sustainability Sustainability
AWS Well-Architected Framework · partial
Future evolution
Standard cost telemetry schemas for multi-provider AI gateways.