How LLM spend actually runs away
"Runaway spend" almost never means a team decided to spend more. It means a handful of specific, recurring failure modes went unchecked because nothing was watching for them in real time:
- Agent loops. An autonomous agent retries a failing step, or reasons in a loop, without a hard stop condition. Each iteration is a real, billed request. A bug that would be a silent no-op in traditional software is a live metered API call here.
- Retry storms. A downstream failure (rate limit, timeout, malformed response) triggers an automatic retry with no backoff or cap, and the retry logic itself becomes the cost driver.
- Unbounded context growth. A conversational or agentic workflow keeps appending to context instead of summarizing or truncating it. Token cost per call climbs silently over the lifetime of a session.
- Shadow AI tool sprawl. Individual engineers or teams adopt a coding assistant, an agent framework, or a new model, each with its own API key and its own bill, with no central view of what's running or what it costs in aggregate.
- Dev-vs-prod bleed. Development and staging traffic shares the same credentials and the same budget as production, so an engineer's local testing loop competes with real customer traffic for the same spending ceiling.
None of these show up as a decision anyone made. They show up as a number on next month's invoice.
This isn't hypothetical
Every company below spent real engineering time reacting to a spend problem after it had already happened, then built ad hoc caps by hand.
Uber's new per-tool, per-engineer cap, after burning its full 2026 AI budget in four months
ForbesTesla's new per-employee cap, after some engineers ran up thousands of dollars weekly
The InformationThe cost jump Priceline saw on a routine AI tooling contract renewal
TechCrunchThe cut in AI spend Coinbase achieved while usage kept growing, via routing and defaults, not just caps
via XHard limits vs. soft alerts
These solve different problems, and most teams need both, but they're not interchangeable:
Soft alerts
A threshold that notifies a human (Slack message, email) when spend crosses a level, typically 80% of budget. Good for visibility and early warning. Does nothing to stop the request that pushes past 100% while someone's reading the notification.
Hard limits
A threshold enforced at the point of execution: the request that would breach the cap is denied before it reaches the provider, so the spend simply never happens. This is the difference between "we found out" and "it didn't occur."
The practical pattern is layered: a soft alert at 80% gives a team time to react before anything is blocked, and a hard limit at 100% guarantees the worst case is bounded even if nobody reacts in time.
See how to configure both in the Budgets guide.
Per-team attribution mechanics
A budget without attribution just tells you the org overspent: not which team, project, or workload did it, and not who to talk to about it. The mechanics that make attribution actually work:
- Every request carries an identity: which application or agent made the call, not just which API key was used (a shared key tells you nothing once more than one thing uses it).
- Attribution is layered: organization, project, and workload, plus, for customer-facing or multi-tenant products, account and customer, so spend rolls up to whichever level the question is actually being asked at.
- Attribution is enforced at the same layer as the budget, not reconstructed later from logs. If the gateway doesn't know which project a request belongs to at the moment it decides whether to allow it, that project can't have its own cap.
This is what turns "AI cost $40,000 last month" into "the fraud-detection agent cost $22,000, the support chatbot cost $11,000, and a staging environment accounted for the rest," a number finance can act on, attached to a team that can actually change it.
A worked example
A mid-size engineering org (six product teams, roughly 40 engineers, using a mix of Anthropic, OpenAI, and Gemini across three internal products) sets up budget controls like this:
- One workload per product. Each of the three products gets its own workload identity, so its traffic is never attributed to, or capped alongside, another product's.
- An org-wide hard ceiling. A monthly cap at the organization level bounds the absolute worst case, regardless of which team or product causes it.
- A project-level cap per product, tagged via each workload's default project ID and sized to that product's normal usage plus headroom, so one product's incident can't consume the budget the other two need.
- An 80% soft alert to the owning team's Slack channel, so the team that can actually investigate finds out before the cap fires, not after.
- A separate, smaller cap for staging and dev credentials, so a local testing loop can't compete with production traffic for the same ceiling.
None of this requires the application code to know its own budget, retry logic, or spend-to-date. The gateway enforces it centrally, so the architecture doesn't depend on every team implementing the same discipline independently.
What actually helps
A dashboard that shows spend after it happens is observability, not prevention: useful for understanding a trend, powerless to stop a bad one in progress. The tool that actually prevents runaway spend is the one that can say no to a request before it's billed, at the layer every provider call already passes through: the gateway. Axemere enforces hard and soft budget limits at every scope described above (org, project, workload, and, with per-request attribution, account and customer), in real time, across every provider behind it. See exactly how it's configured in the budget-enforcement scenario walkthrough or the full documentation.
Set your first budget cap in minutes
Start a 30-day free trial and enforce a real limit before the next invoice, not after.
How Axemere's budget enforcement compares to LiteLLM and OpenRouter