.NET API
IRunPricingResolver
Tracon.Abstractions.dllComputes the cost from a model+usage pair. Pricing order: the model
catalog, then the Tracon:Pricing configuration.
public interface IRunPricingResolverRemarks
Section titled “Remarks”Tenant behavior — TENANT-INDEPENDENT. IRunPricingResolver.Resolve is a pure function of provider, model and usage; the pricing catalog and configuration it reads from are global, not per-tenant, so the same price applies regardless of which tenant’s run is being costed.
Methods
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.