Interface: ModelPrice
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:53
A model's rates: its standard card and, on a model priced by prompt length, the card above a prompt size.
Extends
Properties
automaticCacheWritePerMTokUSD?
optionalautomaticCacheWritePerMTokUSD:number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:47
The rate a prompt-cache write is billed at on a request that asks for no caching: OpenAI caches every prompt on GPT-5.6 and later by default and bills the write at 1.25x input. Unset where a request without cache settings writes nothing (Anthropic, OpenAI before GPT-5.6).
Inherited from
ModelPriceTier.automaticCacheWritePerMTokUSD
cacheReadPerMTokUSD?
optionalcacheReadPerMTokUSD:number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:49
Prompt tokens read from the prompt cache, where the table knows the rate.
Inherited from
ModelPriceTier.cacheReadPerMTokUSD
cacheWritePerMTokUSD?
optionalcacheWritePerMTokUSD:number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:34
The highest rate a prompt-cache write is billed at when the request asks for caching: Anthropic's 1-hour write
(2x input) on a request with cache_control, OpenAI's 12-hour write (2.5x input) on a model that bills writes.
A finished call's writes that its report names as made with that longer lifetime are priced at it. Unset where
the provider bills no write.
Inherited from
ModelPriceTier.cacheWritePerMTokUSD
defaultCacheWritePerMTokUSD?
optionaldefaultCacheWritePerMTokUSD:number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:41
The rate of a prompt-cache write with the provider's default lifetime, the one a request that names none writes
with: Anthropic's 5-minute write and OpenAI's 30-minute write, both 1.25x input. A finished call's writes that its
report does not name as made with the longer lifetime are priced at it. Unset where the provider bills no write; a
card with cacheWritePerMTokUSD alone prices every write at that rate.
Inherited from
ModelPriceTier.defaultCacheWritePerMTokUSD
inputPerMTokUSD
inputPerMTokUSD:
number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:25
Prompt tokens.
Inherited from
ModelPriceTier.inputPerMTokUSD
longContext?
optionallongContext:object&ModelPriceTier
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:55
The card a call whose prompt is over thresholdTokens tokens pays for its whole usage.
Type Declaration
thresholdTokens
thresholdTokens:
number
outputPerMTokUSD
outputPerMTokUSD:
number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:27
Completion tokens, reasoning tokens included.