Interface: MaxCostRequest
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:193
What a request sends, for estimateMaxCallCostUSD.
Properties
cacheMarkers?
optionalcacheMarkers:boolean
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:221
The request asks for prompt caching: cache_control on the request or a block (Anthropic), cache settings or a
breakpoint (OpenAI's prompt_cache_options, prompt_cache_breakpoint, prompt_cache_retention). A
cache_control or prompt_cache_breakpoint key in the messages, the system prompt or the tools counts as well.
maxOutputTokens?
optionalmaxOutputTokens:number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:213
The request's output cap: max_tokens, max_completion_tokens or max_output_tokens, as the request sends it. A
call with none has no bound. A host that cuts a cap above the model's ceiling passes the cut cap: the ceiling a
library table knows shapes a request, and is never taken as what the provider will bill.
messages
messages:
unknown
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:200
The messages (or a Responses API input) as the provider is sent them. A string counts as one message. The bound
counts what the request carries: a request that draws in context stored with the provider (OpenAI's
previous_response_id, conversation or a stored prompt) is billed for tokens its text does not show, so a host
sends that context here or refuses the request.
n?
optionaln:number
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:215
Completions asked for (n, best_of): each is billed its own output, so a request for more than one has no bound.
nonTextParts?
optionalnonTextParts:boolean
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:226
The request carries a content part that is not text (an image, audio, a file, a document), or asks for output that
is not text (OpenAI's modalities with audio): billed by its own measure.
priorityTier?
optionalpriorityTier:boolean
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:234
The request asks for a faster tier at a higher price (OpenAI's service_tier: 'priority' or fast mode, Anthropic's speed: 'fast').
providerSideTools?
optionalproviderSideTools:boolean
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:232
The request names a tool the provider runs or defines (Anthropic's server tools, the Responses API's built-in
tools), or tools the provider fetches itself (Anthropic's mcp_servers), whose definitions the request's text does
not hold.
regionalProcessing?
optionalregionalProcessing:boolean
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:236
The request is processed in one region at an uplift (Anthropic's inference_geo: 'us', OpenAI's regional endpoints).
system?
optionalsystem:unknown
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:205
The system prompt (or instructions), and anything else the request sends that the provider bills as input text,
such as a structured-output schema: its text is counted with the system prompt's.
tools?
optionaltools:unknown
Defined in: packages/agentos/src/api/runtime/modelPricing.ts:207
The tool definitions as the provider is sent them.