Skip to main content

Function: registerModelPricing()

registerModelPricing(providerId, table): void

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

Registers the host's price table for providerId, replacing any table registered for it before. For openai and anthropic the table is read only for a model the built-in table does not price; for any other provider it is the only table. A host that refreshes its prices (OpenRouter's models endpoint each day) registers again; a table that prices nothing (() => undefined) takes its prices away.

Parameters​

providerId​

string

table​

ModelPriceTable

Returns​

void