Interface IProviderEndpointCredentialSource
- Namespace
- MailFathom.AI.Providers
- Assembly
- MailFathom.AI.dll
Resolves what one request presents to one AI provider endpoint.
public interface IProviderEndpointCredentialSource
Remarks
The port exists so this boundary holds no secret provider at all: references, schemes, and the resolution rules governed by ADR 0005 stay where every other credential's do, and what arrives here is already resolved material with a defined lifetime. It is asked per request rather than once, which is what lets a rotated key take effect without a restart.
One source serves every provider role, because an alias names one endpoint across the whole deployment. Startup refuses a chat endpoint that reuses an embedding endpoint's alias for exactly that reason: the alias is what a credential, a resilience circuit, and every log line naming an endpoint are keyed by, and two endpoints answering to one name would share all three.
Methods
- ResolveAsync(string, CancellationToken)
Resolves the credential configured for one endpoint.