Skip to main content

Interface: ModelPriceTier

Defined in: packages/agentos/src/api/runtime/modelPricing.ts:23

One rate card, in US dollars per million tokens.

Extended by​

Properties​

automaticCacheWritePerMTokUSD?​

optional automaticCacheWritePerMTokUSD: 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).


cacheReadPerMTokUSD?​

optional cacheReadPerMTokUSD: number

Defined in: packages/agentos/src/api/runtime/modelPricing.ts:49

Prompt tokens read from the prompt cache, where the table knows the rate.


cacheWritePerMTokUSD?​

optional cacheWritePerMTokUSD: 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.


defaultCacheWritePerMTokUSD?​

optional defaultCacheWritePerMTokUSD: 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.


inputPerMTokUSD​

inputPerMTokUSD: number

Defined in: packages/agentos/src/api/runtime/modelPricing.ts:25

Prompt tokens.


outputPerMTokUSD​

outputPerMTokUSD: number

Defined in: packages/agentos/src/api/runtime/modelPricing.ts:27

Completion tokens, reasoning tokens included.