# IModelProviderHealthCheck

> 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.imodelproviderhealthcheck/
> Summary: IModelProviderHealthCheck: The optional health-check contract for a model provider.

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

The optional health-check contract for a model provider.

```csharp
public interface IModelProviderHealthCheck
```

## Remarks

A member is **not added** to the [IModelProvider](/api/tracon.imodelprovider/)
interface — that would break the consumer's own [IModelProvider](/api/tracon.imodelprovider/)
implementation. This separate interface is an optional extension point: if
a provider does not implement it, its status is
[ModelProviderHealthStatus.Unknown](/api/tracon.modelproviderhealthstatus/), and that is not an error.
It is a separate interface because adding a member to an existing one
breaks every consumer implementation.

The check **must not make a billed model call**. OpenAI and
compatible servers offer the `GET {endpoint}/models` endpoint; this
endpoint returns model names and produces no charge.

## Methods

### <a id="Tracon_IModelProviderHealthCheck_CheckHealthAsync_System_Threading_CancellationToken_"></a> CheckHealthAsync\(CancellationToken\)

Checks the provider's reachability.

```csharp
ValueTask<ModelProviderHealth> CheckHealthAsync(CancellationToken cancellationToken = default)
```

#### Parameters

`cancellationToken` [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)

The cancellation token.

#### Returns

 [ValueTask](https://learn.microsoft.com/dotnet/api/system.threading.tasks.valuetask\-1)<[ModelProviderHealth](/api/tracon.modelproviderhealth/)\>

The check result.
