Skip to main content

Module budget

Module budget 

Source
Expand description

Budget Enforcement — the promoter’s purse control.

The BudgetEnforcer checks spending limits before each LLM call and returns a BudgetVerdict indicating whether the request is allowed, approaching a limit (warning), or blocked (over budget).

Budget enforcement is opt-in: if no limits are configured for a fighter or globally, all requests are allowed.

Structs§

BudgetEnforcer
Enforces spending limits by checking the metering engine before each LLM call. Supports per-fighter and global limits.
BudgetLimit
Spending limits for a fighter or globally.
BudgetStatus
Current budget status for display / API responses.

Enums§

BudgetVerdict
The verdict from a budget check.