feat(coding-agent): expose dynamic provider refresh

This commit is contained in:
Mario Zechner
2026-07-15 12:56:50 +02:00
parent 45203abfa0
commit bd9e09db44
13 changed files with 164 additions and 55 deletions
@@ -25,6 +25,7 @@ import type {
OAuthCredentials,
OAuthLoginCallbacks,
ProviderHeaders,
RefreshModelsContext,
SimpleStreamOptions,
TextContent,
ToolResultMessage,
@@ -1420,6 +1421,11 @@ export interface ProviderConfig {
authHeader?: boolean;
/** Models to register. If provided, replaces all existing models for this provider. */
models?: ProviderModelConfig[];
/**
* Refresh this provider's model list. The returned list replaces extension-provided models.
* Use context.store explicitly when the catalog should persist across sessions.
*/
refreshModels?(context: RefreshModelsContext): Promise<ProviderModelConfig[]>;
/** OAuth provider for /login support. The `id` is set automatically from the provider name. */
oauth?: {
/** Display name for the provider in login UI. */