fix(coding-agent): allow custom providers to use stored auth

closes #5953
This commit is contained in:
Armin Ronacher
2026-06-23 11:51:33 +02:00
parent 590482cf6d
commit ce6a67fc94
4 changed files with 9 additions and 7 deletions
@@ -546,13 +546,11 @@ export class ModelRegistry {
);
}
} else if (!isBuiltIn) {
// Non-built-in providers with custom models require endpoint + auth.
// Non-built-in providers with custom models require an endpoint.
// Auth can come from auth.json, --api-key, or provider request config.
if (!providerConfig.baseUrl) {
throw new Error(`Provider ${providerName}: "baseUrl" is required when defining custom models.`);
}
if (!providerConfig.apiKey) {
throw new Error(`Provider ${providerName}: "apiKey" is required when defining custom models.`);
}
}
// Built-in providers with custom models: baseUrl/apiKey/api are optional,
// inherited from built-in models. Auth comes from env vars / auth storage.