Skip to content

Commit 70805ba

Browse files
fix(shared): a hidden project default model falls back to the global default
A project's default model override that names a model hidden for its provider instance was still applied, and clients then resolved it to the catalog's first visible model. The override is now ignored like one whose provider is disabled for the project, so the environment default applies. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 5d21cd4 commit 70805ba

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎packages/shared/src/projectSettings.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,17 @@ function resolveProjectOverrides(
154154
) {
155155
continue;
156156
}
157+
// Clients resolve a hidden model to the catalog's first visible one, so a
158+
// hidden project default would silently pick a model nobody chose.
159+
if (
160+
key === "defaultModelSelection" &&
161+
value !== null &&
162+
settings.providerModelPreferences?.[
163+
(value as ModelSelection).instanceId
164+
]?.hiddenModels.includes((value as ModelSelection).model)
165+
) {
166+
continue;
167+
}
157168
effective[key] = value;
158169
sources[key] = "project";
159170
}

0 commit comments

Comments
 (0)