getProviderCredential function
- Ref ref,
- AiProvider provider
Read the user's credential for the given provider. API key for Claude, OAuth access token for OpenAI/Gemini, active model ID for local (functions as the "credential" the proxy/datasource needs to load the correct GGUF — though local never goes through the proxy).
Implementation
Future<String?> getProviderCredential(Ref ref, AiProvider provider) =>
_credentialFor(provider, ref.read);