QuotaDecision
@forge/monorepo / backend/src / QuotaDecision
Type Alias: QuotaDecision
QuotaDecision = {
admitted:true;usage:UsageTotals;warnings: readonlyQuotaWarning[]; } | {admitted:false;dimension:QuotaDimension;limit:number;message:string;modelId?:string;retryAfter:string;used:number; }
Defined in: backend/src/usage/quota.ts:192
The admission answer.
A union, so "refused" has no allowed shape to hide in: a caller cannot read a refusal as a permissive
default, which for a spend limit is the failure that costs money.
Union Members
Type Literal
{ admitted: true; usage: UsageTotals; warnings: readonly QuotaWarning[]; }
Type Literal
{ admitted: false; dimension: QuotaDimension; limit: number; message: string; modelId?: string; retryAfter: string; used: number; }
admitted
readonlyadmitted:false
dimension
readonlydimension:QuotaDimension
limit
readonlylimit:number
message
readonlymessage:string
modelId?
readonlyoptionalmodelId?:string
Present when the limit that refused is scoped to one model — #182.
retryAfter
readonlyretryAfter:string
used
readonlyused:number