IAiKeyStore
ReferencesPersistent storage for LLM-provider API keys. Implementations use the platform's native secret store: macOS Keychain on macOS, DPAPI-encrypted file on Windows. Keys are scoped to the current OS user account and to a specific AiProvider, so an Anthropic key and a Google key can coexist.
Methods
DeleteKey
#Removes the stored key for the given provider. Silent if no key was stored.
Parameters:
| provider (AiProvider) |
SetKey
#Stores the given API key for the given provider, overwriting any existing entry. Throws on failure.
Parameters:
| provider (AiProvider) | |
| apiKey (string) |
TryGetKey
#Returns the stored API key for the given provider, or null if none is stored or it cannot be read.
Parameters:
| provider (AiProvider) |