Constructor AiProviderHealth
- Namespace
- MailFathom.Application.AiProviders
- Assembly
- MailFathom.Application.dll
AiProviderHealth(AiProviderRole, AiProviderHealthState, DateTimeOffset?)
What the last call to one AI provider established, and when.
public AiProviderHealth(AiProviderRole Role, AiProviderHealthState State, DateTimeOffset? ObservedAt)
Parameters
RoleAiProviderRoleWhich provider this describes.
StateAiProviderHealthStateWhat the last call established about it.
ObservedAtDateTimeOffset?When that call ended, or null while nothing has been observed.
Remarks
ObservedAt records when the state was established, and what reads it is whatever has to decide
whether calling the provider again now would buy anything: the semantic read path for the embedding role, and the
answering capability for the chat one. The health check reads State alone, so a provider that
failed once during a deployment and has not been called since probes exactly as one that failed a moment ago does.
A reader acting on the moment owes a staleness window of its own, because how long a provider may go unasked before its last failure stops being news depends on what else calls it. Absence of a moment is treated as old rather than fresh by both readers today, so an unstamped state can never be what withholds a capability indefinitely.