Skip to content

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?

Before the provider is invoked, monitor():

  1. Validates required identity and attribution fields when configured
  2. Estimates maximum exposure from input size and an enforceable output bound
  3. Takes a local hold
  4. Optionally creates a shared reservation with FinOps authority
  5. Denies with BudgetExceeded when the call would exceed the remaining budget

A denied request causes zero provider calls.

After a completed call (for streams, at stream end once provider usage is known):

  1. Provider usage is recorded when available
  2. Cost is settled against the reservation / local ledger
  3. Soft trajectory controls may raise KazenCircuitBreaker
  4. Evidence events may be emitted to configured sinks
  • 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