# ModelFallback

> 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.modelfallback/
> Summary: ModelFallback: One link of a ModelBinding.Fallbacks chain.

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

One link of a [ModelBinding.Fallbacks](/api/tracon.modelbinding/#Tracon_ModelBinding_Fallbacks) chain.

```csharp
public sealed record ModelFallback : IEquatable<ModelFallback>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.modelfallback/">ModelFallback</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;ModelFallback&gt;</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

Deliberately narrow: only the provider and the model name, not a full
[ModelBinding](/api/tracon.modelbinding/). A fallback binding embedding another fallback
chain would produce a recursive type that is hard to validate and to
reason about. The fallback call receives the same request options as the
primary call — temperature, top-p, `maxOutputTokens`, the response format
and the tools — with only the model name replaced. The primary binding's
[ModelBinding.ProviderSettings](/api/tracon.modelbinding/#Tracon_ModelBinding_ProviderSettings) do not carry over: they shape the
primary provider's client, and the fallback provider's client is built
without them.

## Constructors

### <a id="Tracon_ModelFallback__ctor"></a> ModelFallback\(\)

```csharp
public ModelFallback()
```

## Properties

### <a id="Tracon_ModelFallback_Model"></a> Model

Gets the model name, for example `claude-opus-5`.

```csharp
public required string Model { get; init; }
```

#### Property Value

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

Gets the provider name, for example `anthropic`.

```csharp
public required string Provider { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### <a id="Tracon_ModelFallback_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ModelFallback_Equals_Tracon_ModelFallback_"></a> Equals\(ModelFallback?\)

```csharp
public bool Equals(ModelFallback? other)
```

#### Parameters

`other` [ModelFallback](/api/tracon.modelfallback/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ModelFallback_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_ModelFallback_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_ModelFallback_op_Equality_Tracon_ModelFallback_Tracon_ModelFallback_"></a> operator ==\(ModelFallback?, ModelFallback?\)

```csharp
public static bool operator ==(ModelFallback? left, ModelFallback? right)
```

#### Parameters

`left` [ModelFallback](/api/tracon.modelfallback/)?

`right` [ModelFallback](/api/tracon.modelfallback/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_ModelFallback_op_Inequality_Tracon_ModelFallback_Tracon_ModelFallback_"></a> operator \!=\(ModelFallback?, ModelFallback?\)

```csharp
public static bool operator !=(ModelFallback? left, ModelFallback? right)
```

#### Parameters

`left` [ModelFallback](/api/tracon.modelfallback/)?

`right` [ModelFallback](/api/tracon.modelfallback/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
