Table of Contents

Interface IAiProviderHealthRecorder

Namespace
MailFathom.Application.AiProviders
Assembly
MailFathom.Application.dll

Records what one call to an AI provider established about it.

public interface IAiProviderHealthRecorder

Remarks

Separate from IAiProviderHealthReader because the two have no consumer in common. A provider adapter only ever writes and must not be able to consult the state it is producing; a capability gate and a health check only ever read and have no business declaring a provider healthy.

Every method is safe to call from any number of concurrent requests and none of them blocks: recording is on the path of a real provider call, so it costs what a field assignment costs and nothing more.

Methods

RecordMisconfigured(AiProviderRole)

Records that a call failed for a reason no later attempt changes until somebody acts.

RecordServed(AiProviderRole)

Records that a call to the provider produced an answer.

RecordUnavailable(AiProviderRole)

Records that a call failed for a reason a later attempt may not meet.