# TraconPricingOptions

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.traconpricingoptions/
> Summary: TraconPricingOptions: Defines a run-cost price source. It is a secondary source for a model that has no price in the ModelDescriptor catalog.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Core.dll</code></div>

Defines a run-cost price source. It is a secondary source for a model that
has no price in the [ModelDescriptor](/api/tracon.modeldescriptor/) catalog.

```csharp
public sealed class TraconPricingOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconpricingoptions/">TraconPricingOptions</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

Tracon does **not invent prices**. This stores only
values supplied by the consumer in configuration. Configuration paths:

- `Tracon:Pricing:Currency`
- `Tracon:Pricing:{provider}:{model}:Input\|Output`
- `Tracon:Pricing:Voice:{provider}:{model}:PerMillionCharacters\|PerMinute`
- `Tracon:Pricing:Images:{provider}:{model}:PerImage\|OutputCostPerMillionTokens`
- `Tracon: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

### <a id="Tracon_TraconPricingOptions__ctor"></a> TraconPricingOptions\(\)

```csharp
public TraconPricingOptions()
```

## Properties

### <a id="Tracon_TraconPricingOptions_Currency"></a> Currency

Gets or sets the currency label displayed in reports. No conversion occurs.

```csharp
public string? Currency { get; set; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_TraconPricingOptions_HostedTools"></a> HostedTools

Gets hosted tool prices per kind, keyed by model provider name and then by the name of a
[HostedToolKind](/api/tracon.hostedtoolkind/).

```csharp
public IDictionary<string, IDictionary<string, HostedToolPriceOverride>> HostedTools { get; }
```

#### Property Value

 [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [HostedToolPriceOverride](/api/tracon.hostedtoolpriceoverride/)\>\>

#### 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.

### <a id="Tracon_TraconPricingOptions_Images"></a> Images

Gets image-generation prices per model, keyed by provider name.

```csharp
public IDictionary<string, IDictionary<string, ImagePriceOverride>> Images { get; }
```

#### Property Value

 [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [ImagePriceOverride](/api/tracon.imagepriceoverride/)\>\>

#### Remarks

A model is priced either per generated image or per output token. The two
modes are deliberately separate from [TraconPricingOptions.Providers](/api/tracon.traconpricingoptions/#Tracon_TraconPricingOptions_Providers), which prices
chat-model input and output tokens.

### <a id="Tracon_TraconPricingOptions_Providers"></a> Providers

Gets price overrides per model, keyed by provider name.

```csharp
public IDictionary<string, IDictionary<string, ModelPriceOverride>> Providers { get; }
```

#### Property Value

 [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [ModelPriceOverride](/api/tracon.modelpriceoverride/)\>\>

### <a id="Tracon_TraconPricingOptions_Voice"></a> Voice

Gets voice prices per model, keyed by voice provider name.

```csharp
public IDictionary<string, IDictionary<string, VoicePriceOverride>> Voice { get; }
```

#### Property Value

 [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [VoicePriceOverride](/api/tracon.voicepriceoverride/)\>\>

#### Remarks

Voice pricing uses characters or duration rather than tokens, so it cannot
share a dictionary with [TraconPricingOptions.Providers](/api/tracon.traconpricingoptions/#Tracon_TraconPricingOptions_Providers). The two sections are not
combined because their units differ;
