refactor: add ModelRegistry.getApiKeyForProvider() for cleaner abstraction

This commit is contained in:
Mario Zechner 2026-01-13 18:12:09 +01:00
parent 3272040873
commit 7534802752
2 changed files with 8 additions and 1 deletions

View file

@ -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).
*/