fix: vision slot filters to image-capable + custom models (was relaxing for all providers)

The prior change made the vision slot show every model (image-capable first),
which relaxed the filter for built-in providers too — built-in text-only models
became selectable for Vision. Centralize the vision rule in ModelMenuList:
built-ins must report image input; custom-endpoint models stay selectable (their
capability may be unreported). Image-capable still float first.
This commit is contained in:
Daniel Buckner
2026-10-27 15:56:17 -07:00
parent dbf80803cc
commit 5b1fd81815
4 changed files with 27 additions and 21 deletions
+2 -6
View File
@@ -600,10 +600,6 @@ export function AgentSection({
const chosen = coord ? catalog?.find((m) => m.id === coord.id && m.provider === coord.provider) : undefined;
const levels = chosen ? chosen.supportedLevels : THINKING_LEVELS;
const thisMenuOpen = openMenu?.target === slot ? openMenu.kind : null;
// Vision slot: image-capable models float first, but all stay
// selectable (a custom endpoint that doesn't report modality must
// remain pickable) — so this orders, never filters.
const slotCatalog = catalog;
return (
<SettingsRow
key={slot}
@@ -648,10 +644,10 @@ export function AgentSection({
menuClass="flex w-[22rem] flex-col rounded-xl border border-border bg-card p-2 text-xs shadow-xl"
>
<ModelMenuList
models={slotCatalog ?? undefined}
models={catalog ?? undefined}
effectiveId={modelId}
effectiveProvider={provider}
prioritizeImage={slot === "vision"}
vision={slot === "vision"}
onPick={(entry) => {
// Auto-populate (chunk 2, owner: "populate everywhere"): the
// fresh pick writes a level — the stored one rides as-is