IModelProviderHealthCheck
AgentPrism.Abstractions.dllThe optional health-check contract for a model provider.
public interface IModelProviderHealthCheckRemarks
Section titled “Remarks”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.
Methods
Section titled “Methods”CheckHealthAsync(CancellationToken)
Section titled “ CheckHealthAsync(CancellationToken)”Checks the provider’s reachability.
ValueTask<ModelProviderHealth> CheckHealthAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<ModelProviderHealth>
The check result.