Interface SpendLimitInfo

What a budget was about to refuse, for an onLimitReached callback.

interface SpendLimitInfo {
    budgetId: string;
    capType: CostCapType | "tokens" | "unpriced";
    what: string;
    reason: string;
}

Properties

budgetId: string

The budget's id.

capType: CostCapType | "tokens" | "unpriced"

Which cap: the guard's session, daily or single-call cap, the token budget, or a model with no price row.

what: string

What the call was: generate_text.step, stream_text, embed_text and the like.

reason: string

Why, in one sentence.