Skip to main content

UsageLimitRecord

@forge/monorepo


@forge/monorepo / backend/src / UsageLimitRecord

Type Alias: UsageLimitRecord

UsageLimitRecord = object

Defined in: backend/src/persistence/index.ts:633

Properties

costMinorUnits?

readonly optional costMinorUnits?: number

Defined in: backend/src/persistence/index.ts:648


inputTokens?

readonly optional inputTokens?: number

Defined in: backend/src/persistence/index.ts:649


modelId?

readonly optional modelId?: string

Defined in: backend/src/persistence/index.ts:647

The model this allowance covers, or absent for any model — #182.

A separate limit rather than a component of one: "500 of Opus in any five hours" and "10,000 a month overall" are two allowances that both bind, not one allowance with two fields.


outputTokens?

readonly optional outputTokens?: number

Defined in: backend/src/persistence/index.ts:650


principalId?

readonly optional principalId?: PrincipalId

Defined in: backend/src/persistence/index.ts:635


tenantId

readonly tenantId: TenantId

Defined in: backend/src/persistence/index.ts:634


updatedAt

readonly updatedAt: string

Defined in: backend/src/persistence/index.ts:652


updatedBy?

readonly optional updatedBy?: string

Defined in: backend/src/persistence/index.ts:654

Who set it. A spend limit is the kind of setting somebody eventually has to explain.


warnAt?

readonly optional warnAt?: number

Defined in: backend/src/persistence/index.ts:651


window

readonly window: QuotaWindow

Defined in: backend/src/persistence/index.ts:640

The span this allowance covers — widened from period: RollupPeriod by #181, so an admin can set a rolling window as easily as a calendar one.