Skip to main content

Function: modelPricing()

modelPricing(providerId, modelId): ModelPrice | undefined

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

The rates a call to modelId on providerId is billed at: the built-in table's row for openai and anthropic, else the row of the table the host registered for the provider (registerModelPricing); undefined when neither prices the model, or the host's row holds a rate that cannot be counted (NaN, infinite or negative).

Parameters​

providerId​

string

modelId​

string

Returns​

ModelPrice | undefined