refactor: add ModelRegistry.getApiKeyForProvider() for cleaner abstraction
This commit is contained in:
@@ -375,6 +375,13 @@ export class ModelRegistry {
|
||||
return this.authStorage.getApiKey(model.provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get API key for a provider.
|
||||
*/
|
||||
async getApiKeyForProvider(provider: string): Promise<string | undefined> {
|
||||
return this.authStorage.getApiKey(provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a model is using OAuth credentials (subscription).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user