How a hard spending limit works
KazenAI’s Control path answers one question before spending money:
Should this provider call be allowed under the configured budget and policy?
Pre-dispatch
Section titled “Pre-dispatch”Before the provider is invoked, monitor():
- Validates required identity and attribution fields when configured
- Estimates maximum exposure from input size and an enforceable output bound
- Takes a local hold
- Optionally creates a shared reservation with FinOps authority
- Denies with
BudgetExceededwhen the call would exceed the remaining budget
A denied request causes zero provider calls.
Post-call
Section titled “Post-call”After a completed call (for streams, at stream end once provider usage is known):
- Provider usage is recorded when available
- Cost is settled against the reservation / local ledger
- Soft trajectory controls may raise
KazenCircuitBreaker - Evidence events may be emitted to configured sinks
What this is not
Section titled “What this is not”- Not a limit on your other costs: limits are checked before model calls only. Your own tools, paid APIs and compute are not checked against a limit before they run. A tool call that reports its own cost can appear in run receipts and spend totals, but it is not stopped by a limit
- Not a guarantee of provider-invoice exactness for every edge case
- Not a claim of production savings without a measured control study
- Streaming settles at stream end when usage is authoritative; early cancel may remain pending — see Supported surfaces
