fix(coding-agent): allow headers-only model overrides closes #3538
This commit is contained in:
@@ -474,10 +474,10 @@ export class ModelRegistry {
|
||||
providerConfig.modelOverrides && Object.keys(providerConfig.modelOverrides).length > 0;
|
||||
|
||||
if (models.length === 0) {
|
||||
// Override-only config: needs baseUrl, compat, modelOverrides, or some combination.
|
||||
if (!providerConfig.baseUrl && !providerConfig.compat && !hasModelOverrides) {
|
||||
// Override-only config: needs baseUrl, headers, compat, modelOverrides, or some combination.
|
||||
if (!providerConfig.baseUrl && !providerConfig.headers && !providerConfig.compat && !hasModelOverrides) {
|
||||
throw new Error(
|
||||
`Provider ${providerName}: must specify "baseUrl", "compat", "modelOverrides", or "models".`,
|
||||
`Provider ${providerName}: must specify "baseUrl", "headers", "compat", "modelOverrides", or "models".`,
|
||||
);
|
||||
}
|
||||
} else if (!isBuiltIn) {
|
||||
|
||||
Reference in New Issue
Block a user