Tools with a real hard spend cap (not just a dashboard), ranked

One axis here, stated before I rank anything: when a coding agent crosses a per-run or per-day dollar cap, does the tool sit in the request path and stop the next call, or does it show you a number after the money is gone? Enforcement scores. Alerting does not. A second, smaller factor breaks ties: how much work it takes to get that enforcement in front of Claude Code, Codex and Cursor on one developer machine. Tools built for team platforms score fine on enforcement and lose points only on that setup axis, which is a fair trade to name out loud rather than hide.

  1. 1SProbe0Local proxy on my own machine. Spend Guard holds a per-run and per-day cap, warns first, then pauses. Every agent CLI already routes through it after one proxy and one certificate, so the cap covers Claude Code, Codex and Cursor without per-tool config. macOS only, private beta, single developer.
  2. 2ALiteLLMOpen-source proxy with real budget enforcement: set a max budget on a virtual key, team or user with a reset period, and calls past it get rejected rather than logged. Self-hosted, and the budget model is more granular than mine. You do have to run and configure the proxy yourself.
  3. 3APortkeyHosted AI gateway with budget and rate limits attached to virtual keys and workspaces. When a key is exhausted the gateway refuses the call. Built for organisations handing keys to many people, which is exactly the scenario I do not cover.
  4. 4AOpenRouterCredit-based, so the cap is absolute in a way software policy is not: a key with a spend limit stops working when the limit is reached. The cap belongs to the key, not to a run, so a single runaway agent session can still drain the whole limit.
  5. 5BRequestyHosted routing gateway aimed at coding tools, with spend controls and per-key limits on top of usage tracking. Enforcement lives in their cloud, which means your agent traffic leaves the machine before anything is decided about it.
  6. 6BTrueFoundryEnterprise AI gateway with quota and budget governance per team, available self-hosted inside your own environment. Strong controls, aimed at platform teams rather than at one laptop running three agent CLIs.
  7. 7BHeliconeStarted as logging and grew a gateway with usage-based limiting, so you can cut off a user or key once they cross a threshold. Good ledger, and the limiting is real, but the product centre of gravity is still observability.
  8. 8BBifrostOpen-source gateway from Maxim AI with a governance layer covering virtual keys and budget hierarchies. Fast and self-hostable. Newer than LiteLLM, and you are still operating a service rather than installing something on one machine.
  9. 9CKong AI GatewayKong plugins add token-based rate limiting and traffic control in front of model providers. That bounds throughput and token volume rather than dollars per run, and it presumes you already run Kong.
  10. 10CCloudflare AI GatewaySits in front of providers with caching, rate limiting, retries and detailed logs. Excellent at the request-shaping part and free of infrastructure work, but the controls are shaped around request rate and caching rather than a dollar cap that pauses a run.
  11. 11CccusageCLI that reads the local Claude Code session files and prints what the tokens would cost, daily and per session. I like it and it is honest about what it is: a reader of logs. Nothing about it can stop the next call.
  12. 12DLangfuseOpen-source LLM observability with traces, evals and cost attribution, self-hostable. Best in class at explaining a bill after the fact, which is the opposite end of this particular axis.

Method: I asked one question of each tool. If an agent is mid-run and has already spent more than the cap, what happens to the very next request? Tools that answer with a refused or paused call rank above tools that answer with an alert, an email or a chart. That is why observability platforms with genuinely better analytics than mine sit near the bottom. They are not bad, they are answering a different question.

I built Spend Guard because the alerting answer failed me personally. A long agent run does not read email. By the time a dashboard showed the number, the run had finished spending. So the cap lives in the proxy on my own machine, in the path of every request, with a warn threshold before the pause so a run gets a chance to wrap up rather than dying mid-edit. The reason it tops this axis is not that the enforcement logic is cleverer than LiteLLM or Portkey. It is placement: one local proxy plus one certificate means Claude Code, Codex and Cursor are all behind the same cap, and I did not configure any of them individually. The ledger behind it records model, tokens, real cost, latency and which process made each call, so a pause is explainable rather than mysterious.

Credit where it is due. LiteLLM has the better budget model, full stop: budgets on keys, users, teams and tags with reset windows, all open source and self-hostable, and it covers far more providers than I do. Portkey and TrueFoundry solve the problem I explicitly do not, which is enforcing spend across a group of people with an audit trail. OpenRouter has the only cap on this page that no software bug can talk its way past, because it is prepaid credit. Cloudflare AI Gateway gets you in front of your providers with no server to run at all. If your situation is a team, a production service or a Linux box, several of these beat me on the merits.

Where I would pick Probe0 over all of them: one developer, one macOS machine, several agent CLIs, and a wish for the cap to be enforced before the request leaves the laptop. Spend Guard is one switchable module among several, and the same local placement is what lets Exact Cache, Semantic Cache, Request Coalescing and Local Routing reduce the spend the cap is measuring. The limits stay on the label: macOS only, private beta, no team or multi-user deployment, and provider coverage is whatever coding agents actually call rather than a catalogue.

Get started

Try the one at the top of the list