IRunPricingResolver
Namespace AgentPrism · Assembly
AgentPrism.Abstractions.dllComputes the cost from a model+usage pair. Pricing order: the model
catalog, then the AgentPrism:Pricing configuration.
public interface IRunPricingResolverMethods
Section titled “Methods”Resolve(string?, string?, RunUsage?)
Section titled “ Resolve(string?, string?, RunUsage?)”Resolves the cost.
RunCost? Resolve(string? provider, string? model, RunUsage? usage)Parameters
Section titled “Parameters”provider string?
The provider name. If null (example: recomputing a historical row), the price is resolved by model name alone, using the first match across providers.
model string?
The model name. Cost does not apply if null or empty.
usage RunUsage?
The token usage. Cost does not apply if null.
Returns
Section titled “Returns”null only if model or
usage is missing (a case where cost can never apply
— for example, a code agent with no bound model). When the model is
known, a RunCost is always returned even if pricing is
undefined; in that case RunCost.Source is
PricingSource.Unknown and the cost fields are
null — not zero.