Skip to main content

Interface: CostBreakdown

Defined in: javascript/src/breakdown.ts:12

Granular credit cost report for a usage event.

All money fields are Decimal (never binary number) and are quantized to 4dp ROUND_HALF_UP. total is the single source of truth: it is recomputed from the components (clamped at 0) and quantized — there is NO implicit integer truncation of the total (that was the revenue-leak bug).

Properties

breakdown

breakdown: Record<string, unknown>

Defined in: javascript/src/breakdown.ts:19


cacheSavings

cacheSavings: Decimal

Defined in: javascript/src/breakdown.ts:16


fixedCredits

fixedCredits: Decimal

Defined in: javascript/src/breakdown.ts:17


modelCredits

modelCredits: Decimal

Defined in: javascript/src/breakdown.ts:13


searchCredits

searchCredits: Decimal

Defined in: javascript/src/breakdown.ts:15


toolCredits

toolCredits: Decimal

Defined in: javascript/src/breakdown.ts:14


total

total: Decimal

Defined in: javascript/src/breakdown.ts:18