Skip to content

IModelProviderHealthCheck

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The optional health-check contract for a model provider.

public interface IModelProviderHealthCheck

A member is not added to the IModelProvider interface — that would break the consumer’s own IModelProvider implementation. This separate interface is an optional extension point: if a provider does not implement it, its status is ModelProviderHealthStatus.Unknown, 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.

Checks the provider’s reachability.

ValueTask<ModelProviderHealth> CheckHealthAsync(CancellationToken cancellationToken = default)

cancellationToken CancellationToken

The cancellation token.

ValueTask<ModelProviderHealth>

The check result.