.NET API
TraconPricingOptions
Tracon.Core.dllDefines a run-cost price source. It is a secondary source for a model that has no price in the ModelDescriptor catalog.
public sealed class TraconPricingOptions- Inheritance
- object ← TraconPricingOptions
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Tracon does not invent prices. This stores only values supplied by the consumer in configuration. Configuration paths:
Tracon:Pricing:CurrencyTracon:Pricing:{provider}:{model}:Input\|OutputTracon:Pricing:Voice:{provider}:{model}:PerMillionCharacters\|PerMinuteTracon:Pricing:Images:{provider}:{model}:PerImage\|OutputCostPerMillionTokensTracon:Pricing:HostedTools:{provider}:{kind}:PerCall(kind:WebSearch,CodeInterpreter,FileSearch)
Wildcards are not supported.
The section is bound manually for AOT. Every child of Pricing is
treated as a provider name, so the Currency, Voice, Images and
HostedTools keys are reserved and cannot be provider names. When adding a reserved key, also update
the skip list in BindPricing.
Constructors
Section titled “Constructors”TraconPricingOptions()
Section titled “ TraconPricingOptions()”public TraconPricingOptions()Properties
Section titled “Properties”Currency
Section titled “ Currency”Gets or sets the currency label displayed in reports. No conversion occurs.
public string? Currency { get; set; }Property Value
Section titled “Property Value”HostedTools
Section titled “ HostedTools”Gets hosted tool prices per kind, keyed by model provider name and then by the name of a HostedToolKind.
public IDictionary<string, IDictionary<string, HostedToolPriceOverride>> HostedTools { get; }Property Value
Section titled “Property Value”IDictionary<string, IDictionary<string, HostedToolPriceOverride>>
Remarks
Section titled “Remarks”A hosted tool (AddHostedTool, or the web search of a harness agent) is billed by the
call, not by token, so it has a dictionary of its own. The provider is the one that ran the
call (openai-responses, anthropic), not a model: the providers bill a search per
call whatever the model. A kind with no price here adds nothing to the run’s total and is counted
as an item the total does not cover; it is never priced at zero.
Images
Section titled “ Images”Gets image-generation prices per model, keyed by provider name.
public IDictionary<string, IDictionary<string, ImagePriceOverride>> Images { get; }Property Value
Section titled “Property Value”IDictionary<string, IDictionary<string, ImagePriceOverride>>
Remarks
Section titled “Remarks”A model is priced either per generated image or per output token. The two modes are deliberately separate from TraconPricingOptions.Providers, which prices chat-model input and output tokens.
Providers
Section titled “ Providers”Gets price overrides per model, keyed by provider name.
public IDictionary<string, IDictionary<string, ModelPriceOverride>> Providers { get; }Property Value
Section titled “Property Value”IDictionary<string, IDictionary<string, ModelPriceOverride>>
Gets voice prices per model, keyed by voice provider name.
public IDictionary<string, IDictionary<string, VoicePriceOverride>> Voice { get; }Property Value
Section titled “Property Value”IDictionary<string, IDictionary<string, VoicePriceOverride>>
Remarks
Section titled “Remarks”Voice pricing uses characters or duration rather than tokens, so it cannot share a dictionary with TraconPricingOptions.Providers. The two sections are not combined because their units differ;