Budgets & Policies
Budgets & Policies
Budgets are scoped across global, tenant, user, cost center, provider, model, agent, and purpose dimensions. Policies add declarative actions: block, require_approval, downgrade, throttle, and queue.
BudgetResolver
Resolves the applicable budget tree for the envelope context and period.
PolicyEngine
Evaluates kill switches, hard budgets, and policy DSL rules.
Approvals
Converts selected high-cost calls into a pending approval workflow.
Enforcement behavior
HTTP 402
Hard blocks throw BudgetExceededException and surface as HTTP 402 with a generic public message. Internal reason details stay on the exception for logging and audit.
Policy lifecycle
- Create a rule
Define the scope match and optional minimum-cost or model criteria. - Validate
Use/policies/validatebefore storing a rule. - Simulate
Use/policies/{id}/simulateagainst sample context. - Audit
Governance model mutations are recorded inai_finops_audit_log.