CostEstimate
@forge/monorepo / backend/src / CostEstimate
Type Alias: CostEstimate
CostEstimate =
object
Defined in: backend/src/usage/index.ts:82
Properties
cachedInputTokens?
readonlyoptionalcachedInputTokens?:number
Defined in: backend/src/usage/index.ts:97
How much of inputTokens the caller expects to be served from cache — task #247.
Optional, and its absence means "assume none", which is what this did unconditionally before. That default is deliberately the conservative one for a spend limit: over-reserving refuses a turn slightly early, under-reserving admits a turn that then exceeds the ceiling, and only the second one costs money.
A seam rather than a prediction. The platform cannot know a hit rate before the call, and inventing one would make every reservation wrong in a new way; a caller that has just observed 97% on the previous turn of the same conversation genuinely does know something, and this is where it says so.
inputTokens
readonlyinputTokens:number
Defined in: backend/src/usage/index.ts:84
maxOutputTokens
readonlymaxOutputTokens:number
Defined in: backend/src/usage/index.ts:85
modelId
readonlymodelId:string
Defined in: backend/src/usage/index.ts:83