Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): key vision capabilities by backend; scope the no-VLM warning
Adam Eivy4303b0e3baf5
diff --git a/client/src/components/creative-director/CreativeDirectorModelsDrawer.jsx b/client/src/components/creative-director/CreativeDirectorModelsDrawer.jsxindex 73108e00bc..15bbd3f416 100644--- a/client/src/components/creative-director/CreativeDirectorModelsDrawer.jsx+++ b/client/src/components/creative-director/CreativeDirectorModelsDrawer.jsx@@ -11,6 +11,7 @@ import {assignmentProviderOptions,assignmentModelOptions,assignmentDefaultModel,+ localBackendForProvider,} from '../../utils/providers.js';// Creative Director provider/model pins, at either of two scopes:@@ -74,7 +75,7 @@ export default function CreativeDirectorModelsDrawer({ open, onClose, project, o// assignments fetch, so `loading===false` with the scan still in flight is the// normal first render, and asserting "none found" there would flash the exact// empty-picker bug this drawer was fixed for.- const { ids: visionModelIds, loaded: visionLoaded } = useVisionModelIds(open);+ const { idsByBackend: visionIdsByBackend, loaded: visionLoaded } = useVisionModelIds(open);const seed = useCallback((next) => { setDrafts(next); setBaseline(next); }, []);@@ -214,17 +215,23 @@ export default function CreativeDirectorModelsDrawer({ open, onClose, project, oconst entry = entryById[assignmentIdFor(stage.key)];const draft = drafts[stage.key] || { providerId: '', model: '' };const providerOptions = assignmentProviderOptions(entry, providers);- const modelOptions = assignmentModelOptions(entry, providers, draft.providerId, visionModelIds);+ const modelOptions = assignmentModelOptions(entry, providers, draft.providerId, visionIdsByBackend);const pinned = !!draft.providerId;+ // Both hints below are about the LOCAL capability scan, so they only+ // apply when the pinned provider is an Ollama / LM Studio backend. A+ // cloud API provider's list is never vision-filtered, so an empty one+ // just means no models are configured on it — "install a VLM" would+ // be the wrong remediation, and the free-text input still works.+ const visionLocal = entry?.modelFilter === 'vision'+ && !!localBackendForProvider(providers.find((p) => p.id === draft.providerId));// A vision stage's options are only trustworthy once the capability// scan has settled — until then `modelOptions` is regex-only, which// is exactly the stale answer that hid the user's VLMs.- const visionPending = entry?.modelFilter === 'vision' && !visionLoaded;- // A vision stage on a local backend with nothing to offer means no- // VLM is installed — say so instead of showing a bare text box that- // reads as a broken dropdown.- const noVisionModels = pinned && entry?.modelFilter === 'vision'- && !visionPending && modelOptions.length === 0;+ const visionPending = visionLocal && !visionLoaded;+ // A local backend with nothing left to offer means no VLM is+ // installed — say so instead of showing a bare text box that reads+ // as a broken dropdown.+ const noVisionModels = pinned && visionLocal && !visionPending && modelOptions.length === 0;return (<section key={stage.key} className="bg-port-bg border border-port-border rounded-lg p-3 space-y-2"><div className="flex items-center gap-2">@@ -249,7 +256,7 @@ export default function CreativeDirectorModelsDrawer({ open, onClose, project, o// Vision-filtered stages (scene evaluation) seed the first// eligible VLM when the provider's default is text-only.const nextDefault = providerId- ? assignmentDefaultModel(entry, providers, providerId, visionModelIds)+ ? assignmentDefaultModel(entry, providers, providerId, visionIdsByBackend): '';// Seed the provider's default model on switch; clearing the// provider clears the model too.diff --git a/client/src/components/creative-director/CreativeDirectorModelsDrawer.test.jsx b/client/src/components/creative-director/CreativeDirectorModelsDrawer.test.jsxindex f81980dba6..f71678e441 100644--- a/client/src/components/creative-director/CreativeDirectorModelsDrawer.test.jsx+++ b/client/src/components/creative-director/CreativeDirectorModelsDrawer.test.jsx@@ -163,6 +163,8 @@ describe('CreativeDirectorModelsDrawer', () => {// The ollama-backed Claude CLI fronting a text-only Ollama model whose id// is also in the real `ollama` provider's list.{ providerId: 'claude-ollama', backend: 'cli', id: 'llama3.2:latest', vision: true },+ // Vision on LM Studio only — must not make the same id vision on Ollama.+ { providerId: 'lmstudio', backend: 'lmstudio', id: 'qwen2.5vl:latest', vision: true },],});renderDrawer({ id: 'cd-1', name: 'Demo', modelOverrides: {} });@@ -192,6 +194,27 @@ describe('CreativeDirectorModelsDrawer', () => {expect(optionValues).not.toContain('llama3.2:latest');});+ // A cloud/custom API provider's list is never vision-filtered, so an empty one+ // means "no models configured", NOT "no VLM installed" — telling the user to+ // install a local VLM would be the wrong remediation.+ it('does not tell a cloud provider to install a local VLM', async () => {+ getAiAssignments.mockResolvedValue({+ ...ASSIGNMENTS,+ providers: [+ ...ASSIGNMENTS.providers,+ { id: 'my-cloud-vlm', name: 'My Cloud VLM', type: 'api', enabled: true, defaultModel: null, models: [] },+ ],+ });+ renderDrawer({ id: 'cd-1', name: 'Demo', modelOverrides: {} });+ await waitFor(() => expect(screen.getByLabelText('Scene evaluation provider')).toBeTruthy());++ fireEvent.change(screen.getByLabelText('Scene evaluation provider'), { target: { value: 'my-cloud-vlm' } });++ expect(screen.queryByText(/No vision-capable models found/i)).toBeNull();+ // The free-text fallback stays usable for a cloud provider with no list.+ expect(screen.getByLabelText('Scene evaluation model')).toBeTruthy();+ });+it('warns instead of showing a bare text box when a vision provider has no VLM', async () => {getAiAssignments.mockResolvedValue({...ASSIGNMENTS,diff --git a/client/src/components/settings/AiAssignmentsTab.jsx b/client/src/components/settings/AiAssignmentsTab.jsxindex e9b5fcf2f3..18bfa038fe 100644--- a/client/src/components/settings/AiAssignmentsTab.jsx+++ b/client/src/components/settings/AiAssignmentsTab.jsx@@ -49,8 +49,8 @@ export default function AiAssignmentsTab() {// Authoritative vision-capable ids straight from the local backends, so a// vision-filtered row (Scene evaluation) isn't reduced to an empty list by// the client's id regex not knowing a newer VLM family. This table renders a- // <select> either way (no "none installed" claim), so it needs `ids` only.- const { ids: visionModelIds } = useVisionModelIds();+ // <select> either way (no "none installed" claim), so it needs the map only.+ const { idsByBackend: visionIdsByBackend } = useVisionModelIds();const load = useCallback(async () => {setLoading(true);@@ -137,7 +137,7 @@ export default function AiAssignmentsTab() {const savedIds = [];for (const entry of targets) {// Vision-filtered rows seed the first eligible VLM, not a text-only default.- const targetDefaultModel = assignmentDefaultModel(entry, data.providers, toProvider, visionModelIds);+ const targetDefaultModel = assignmentDefaultModel(entry, data.providers, toProvider, visionIdsByBackend);const nextModel = entry.modelEditable === false ? (drafts[entry.id]?.model || '') : targetDefaultModel;const next = await updateAiAssignment(entry.id, {providerId: toProvider,@@ -258,7 +258,7 @@ export default function AiAssignmentsTab() {{filtered.map((entry) => {const draft = drafts[entry.id] || getDraft(entry);const providerOptions = assignmentProviderOptions(entry, data.providers);- const modelOptions = assignmentModelOptions(entry, data.providers, draft.providerId, visionModelIds);+ const modelOptions = assignmentModelOptions(entry, data.providers, draft.providerId, visionIdsByBackend);const dirty = !sameDraft(entry, draft);return (<tr key={entry.id} className="align-top">@@ -280,7 +280,7 @@ export default function AiAssignmentsTab() {const nextProviderId = e.target.value;// Vision-filtered rows (e.g. Scene evaluation) seed the// first eligible VLM when the provider default is text-only.- const nextDefault = assignmentDefaultModel(entry, data.providers, nextProviderId, visionModelIds);+ const nextDefault = assignmentDefaultModel(entry, data.providers, nextProviderId, visionIdsByBackend);setDraft(entry.id, { providerId: nextProviderId, model: entry.modelEditable === false ? draft.model : nextDefault });}}aria-label={`Provider for ${entry.label}`}diff --git a/client/src/hooks/README.md b/client/src/hooks/README.mdindex 90ce9de3d6..6354c35020 100644--- a/client/src/hooks/README.md+++ b/client/src/hooks/README.md@@ -148,7 +148,7 @@ grep -i "what you want to do" client/src/hooks/README.md| `useRecordMerge` | Duplicate Universe/Series merge flow: open → dry-run preview → resolve field conflicts → execute, with an `onMerged` refresh callback. Drives `<MergeModal>`. | Surfacing the merge-duplicates UI anywhere (Sharing → Duplicates, Universes page). Don't re-implement the preview/execute dance. || `useProviderModels` | AI providers + two-step provider→model selection. | Any UI that picks a provider + model. || `useLocalModels` | Live installed Ollama/LM Studio model ids per backend + the server's editorial recommendation. | Model pickers that must show currently-installed local models (not just a provider's stale stored `models`). Fold in via `mergeModelLists` + `localBackendForProvider`. |-| `useVisionModelIds` | `{ ids, loaded }` — `ids` is the `Set` of model ids the server reports vision-capable on a LOCAL backend (Ollama `/api/show`, LM Studio `type:'vlm'`), `null` until fetched; `loaded` flips once the fetch settles. Drops `backend:'cli'` rows (a blanket per-provider claim, not a per-model fact). | Any VISION model picker — pass `ids` to `visionLocalModelFilter` / `assignmentModelOptions` so a new multimodal family (`gemma4`) isn't hidden by the stale client id regex; gate any "none installed" messaging on `loaded`. |+| `useVisionModelIds` | `{ idsByBackend, loaded }` — vision-capable model ids the server reports, keyed by local backend (`{ ollama: Set, lmstudio: Set }` from Ollama `/api/show` + LM Studio `type:'vlm'`), `null` until fetched; `loaded` flips once the fetch settles. Drops `backend:'cli'` rows (a blanket per-provider claim, not a per-model fact). | Any VISION model picker — pass `idsByBackend` to `visionLocalModelFilter` / `assignmentModelOptions` so a new multimodal family (`gemma4`) isn't hidden by the stale client id regex; gate any "none installed" messaging on `loaded` and on the provider being a local backend. || `useTheme` | Dark/light theme + paired-theme switching. | Theme picker. || `useSingToScore` | Capture a sung melody from the mic and transcribe it into lead-sheet notation. `start()` opens the mic, counts in on the shared metronome, then accumulates a pitch track relative to beat 1; `stop()` runs the `transcribePitchTrack` pipeline (segment → quantize at the song tempo → spell for the key) and returns the lead-sheet body. Exposes `{ phase, beat, result, error, start, stop, reset }`; tears down mic/analyser/tracker/metronome on stop and unmount. | The Song editor's Sing-to-score panel. || `useSongTraining` | Drives a song training run over one scope (whole song or a sliced section) on top of `useColorMatch`: counts in, walks + grades the scope's score, then folds the finished take into the rolling progress history (`songProgress.recordAttempt`) and surfaces the next aggregate via `onProgress`. Supports looping (auto-restart after a run) and keeps a `lastSummary`. Exposes `{ running, countingIn, noteColors, activeIndex, lastSummary, start, stop }`; cancels pending loop relaunches on stop/unmount. | The Song editor's Training panel. |diff --git a/client/src/hooks/useVisionModelIds.js b/client/src/hooks/useVisionModelIds.jsindex dff786d794..71bcd805c4 100644--- a/client/src/hooks/useVisionModelIds.js+++ b/client/src/hooks/useVisionModelIds.js@@ -22,8 +22,8 @@ import { getVisionModels } from '../services/apiLocalLlm';const LOCAL_VISION_BACKENDS = new Set(['ollama', 'lmstudio']);/**- * The set of model ids the SERVER reports as vision-capable on a LOCAL backend,- * fetched once.+ * The model ids the SERVER reports as vision-capable, keyed BY LOCAL BACKEND+ * (`{ ollama: Set, lmstudio: Set }`), fetched once.** The client's `isVisionModel` regex can only recognize multimodal families it* was written against, so it silently goes stale as new ones ship — it knew@@ -33,28 +33,34 @@ const LOCAL_VISION_BACKENDS = new Set(['ollama', 'lmstudio']);* capabilities and LM Studio's `type: 'vlm'` tag), so vision pickers union this* set with the regex via `visionLocalModelFilter`.*- * Returns `{ ids, loaded }`. Callers union `ids` with the regex, so it only ever- * ADDS models the regex didn't recognize — a `null`/empty set simply degrades to- * regex-only rather than blanking a picker. Widening is the safe direction: a- * stale regex hides a model the user has, whereas this set can't speak for a- * custom provider pointing at a host the server never enumerated, so neither- * source vetoes the other.+ * Returns `{ idsByBackend, loaded }`. Callers union `idsByBackend` with the regex+ * via `visionLocalModelFilter`, so it only ever ADDS models the regex didn't+ * recognize — a `null`/empty map simply degrades to regex-only rather than+ * blanking a picker. Widening is the safe direction: a stale regex hides a model+ * the user has, whereas this map can't speak for a custom provider pointing at a+ * host the server never enumerated, so neither source vetoes the other.+ *+ * Keyed by backend, never flattened to one id set: a bare id is not a+ * capability. The same id can be a VLM on one backend and text-only on another,+ * and CLI rows assert vision for every model of a claude/codex CLI regardless of+ * the model — so a flat set leaks text-only ids onto the `ollama` provider,+ * whose own list contains the very same ids.** `loaded` flips true once the fetch SETTLES (success or failure) and exists so a* caller can tell "still fetching" from "fetched, none installed" — the endpoint* asks Ollama for each installed model's capabilities, so the pending window is* real. Without it a picker asserts "no vision models found" during the fetch- * (the very bug this hook exists to fix) and then flips. `ids` alone can't carry- * that distinction: it stays `null` on failure too.+ * (the very bug this hook exists to fix) and then flips. `idsByBackend` alone+ * can't carry that distinction: it stays `null` on failure too.** @param {boolean} [enabled] gate the fetch — pass a drawer/modal's `open` when* the host stays mounted while closed, so a page merely *containing* a closed* picker doesn't pay for the capability scan. Fetches once and keeps the result* if `enabled` later goes false.- * @returns {{ids: Set<string>|null, loaded: boolean}}+ * @returns {{idsByBackend: Record<string, Set<string>>|null, loaded: boolean}}*/export default function useVisionModelIds(enabled = true) {- const [state, setState] = useState({ ids: null, loaded: false });+ const [state, setState] = useState({ idsByBackend: null, loaded: false });useEffect(() => {if (!enabled || state.loaded) return undefined;@@ -66,15 +72,18 @@ export default function useVisionModelIds(enabled = true) {getVisionModels({ silent: true }).then((res) => {if (canceled) return;- const ids = new Set(- (res?.models || [])- .filter((m) => LOCAL_VISION_BACKENDS.has(m?.backend))- .map((m) => m?.id)- .filter(Boolean),+ // Every local backend gets a key even when it reports nothing, so a+ // present-but-empty backend reads as "none installed" rather than+ // "unknown" at the lookup site.+ const idsByBackend = Object.fromEntries(+ [...LOCAL_VISION_BACKENDS].map((backend) => [backend, new Set()]),);- setState({ ids, loaded: true });+ for (const m of res?.models || []) {+ if (m?.id && LOCAL_VISION_BACKENDS.has(m?.backend)) idsByBackend[m.backend].add(m.id);+ }+ setState({ idsByBackend, loaded: true });})- .catch(() => { if (!canceled) setState({ ids: null, loaded: true }); });+ .catch(() => { if (!canceled) setState({ idsByBackend: null, loaded: true }); });// A cancel (drawer closed mid-flight) leaves `loaded` false, so reopening// refetches rather than rendering against a result that never arrived.return () => { canceled = true; };diff --git a/client/src/utils/providers.js b/client/src/utils/providers.jsindex 13a55ad177..93265f0f08 100644--- a/client/src/utils/providers.js+++ b/client/src/utils/providers.js@@ -198,28 +198,38 @@ export const filterGenerationModels = (models) =>* hide multimodal cloud models whose ids don't encode vision (`gpt-4o`,* `claude-*`). Pass as `useProviderModels({ modelFilter: visionLocalModelFilter })`.*- * `visionModelIds` is the AUTHORITATIVE set the server reports from each- * backend's own capability metadata (Ollama `/api/show`, LM Studio- * `type: 'vlm'`) — see `useVisionModelIds`. It is unioned with, not substituted- * for, the id regex: the regex alone goes stale every time a new multimodal- * family ships (it knew `gemma-3` but not `gemma4`, so a user with only- * `gemma4:e4b` + `qwen3.6:35b` installed saw an EMPTY vision picker), while the- * authoritative set alone can't speak for a custom provider pointing at a- * remote host the server never enumerated. Pass `null` (the default) when the- * list hasn't loaded — a `null` set degrades to today's regex-only behavior,- * whereas an EMPTY set correctly means "fetched: no vision models installed".- * The union is still intersected with the provider's own `models` list by the- * callers below, so an id can never leak onto a provider that lacks it.+ * `visionIdsByBackend` is the AUTHORITATIVE per-backend map the server reports+ * from each backend's own capability metadata (Ollama `/api/show`, LM Studio+ * `type: 'vlm'`) — `{ ollama: Set, lmstudio: Set }`, see `useVisionModelIds`.+ * It is unioned with, not substituted for, the id regex: the regex alone goes+ * stale every time a new multimodal family ships (it knew `gemma-3` but not+ * `gemma4`, so a user with only `gemma4:e4b` + `qwen3.6:35b` installed saw an+ * EMPTY vision picker), while the authoritative map alone can't speak for a+ * custom provider pointing at a remote host the server never enumerated. Pass+ * `null` (the default) when it hasn't loaded — that degrades to regex-only.+ *+ * Keyed BY BACKEND rather than flattened to one id set, because a bare id is+ * not a capability: the same id can be a VLM on one backend and text-only on+ * another, and the server also reports `backend: 'cli'` rows that assert vision+ * for EVERY model of a claude/codex CLI (that CLI can read an image file+ * whatever model it fronts). Flattening let an ollama-backed Claude CLI's+ * text-only ids — which collide with the real `ollama` provider's list — pass+ * this filter, and sceneEvaluator honors a pin's model verbatim, so frames went+ * to a model that cannot see them. The per-provider `models` intersection the+ * callers below apply cannot catch that: the id genuinely is on both lists.** @param {string} id- * @param {{endpoint?:string,name?:string}} [provider]- * @param {Set<string>|null} [visionModelIds]+ * @param {{id?:string,endpoint?:string,name?:string}} [provider]+ * @param {Record<string, Set<string>>|null} [visionIdsByBackend]* @returns {boolean}*/-export const visionLocalModelFilter = (id, provider, visionModelIds = null) =>- localBackendForProvider(provider)- ? visionModelIds?.has(id) === true || isVisionModel(id)- : true;+export const visionLocalModelFilter = (id, provider, visionIdsByBackend = null) => {+ const backend = localBackendForProvider(provider);+ // Cloud/API providers are left intact — the regex is a local-name heuristic+ // and would wrongly hide multimodal cloud ids like `gpt-4o`.+ if (!backend) return true;+ return visionIdsByBackend?.[backend]?.has(id) === true || isVisionModel(id);+};/*** Classify a provider as a local-LLM backend by its id/endpoint/name, so callers@@ -450,11 +460,11 @@ export const assignmentProviderOptions = (entry, providers) => {* When `entry.modelFilter === 'vision'`, LOCAL backends (Ollama / LM Studio)* are reduced to vision-capable models via `visionLocalModelFilter` so the* Scene Evaluation (and other vision) pickers can't offer text-only ids.- * Cloud/API providers are left intact by that filter. Pass `visionModelIds`+ * Cloud/API providers are left intact by that filter. Pass `visionIdsByBackend`* (from `useVisionModelIds`) so that reduction uses the backend's own* capability metadata instead of the id regex alone.*/-export const assignmentModelOptions = (entry, providers, providerId, visionModelIds = null) => {+export const assignmentModelOptions = (entry, providers, providerId, visionIdsByBackend = null) => {const provider = providers.find((p) => p.id === providerId);const raw = Array.isArray(entry?.modelOptions)? entry.modelOptions@@ -465,7 +475,7 @@ export const assignmentModelOptions = (entry, providers, providerId, visionModel.map((m) => (typeof m === 'string' ? m : m?.id)).filter(Boolean);if (entry?.modelFilter === 'vision') {- return models.filter((id) => visionLocalModelFilter(id, provider, visionModelIds));+ return models.filter((id) => visionLocalModelFilter(id, provider, visionIdsByBackend));}return models;};@@ -476,13 +486,13 @@ export const assignmentModelOptions = (entry, providers, providerId, visionModel* filtered options — a local backend's text-only `defaultModel` must not be* seeded into the Scene Evaluation picker.*/-export const assignmentDefaultModel = (entry, providers, providerId, visionModelIds = null) => {+export const assignmentDefaultModel = (entry, providers, providerId, visionIdsByBackend = null) => {if (!providerId) return '';const provider = providers.find((p) => p.id === providerId);if (!provider) return '';const def = provider.defaultModel || '';if (entry?.modelFilter !== 'vision') return def;- const models = assignmentModelOptions(entry, providers, providerId, visionModelIds);+ const models = assignmentModelOptions(entry, providers, providerId, visionIdsByBackend);if (def && models.includes(def)) return def;return models[0] || '';};diff --git a/client/src/utils/providers.test.js b/client/src/utils/providers.test.jsindex d3b2053ace..5bb515542f 100644--- a/client/src/utils/providers.test.js+++ b/client/src/utils/providers.test.js@@ -430,23 +430,32 @@ describe('visionLocalModelFilter', () => {it('accepts a server-reported vision id the stale id regex does not know', () => {// The id regex knows `gemma-3` but not `gemma4` — without the authoritative- // set, a user whose only VLMs are gemma4/qwen3.6 gets an empty picker.+ // map, a user whose only VLMs are gemma4/qwen3.6 gets an empty picker.expect(visionLocalModelFilter('gemma4:e4b', ollama)).toBe(false);- expect(visionLocalModelFilter('gemma4:e4b', ollama, new Set(['gemma4:e4b']))).toBe(true);- expect(visionLocalModelFilter('qwen3.6:35b', ollama, new Set(['qwen3.6:35b']))).toBe(true);+ expect(visionLocalModelFilter('gemma4:e4b', ollama, { ollama: new Set(['gemma4:e4b']) })).toBe(true);+ expect(visionLocalModelFilter('qwen3.6:35b', ollama, { ollama: new Set(['qwen3.6:35b']) })).toBe(true);});- it('unions rather than replaces — the set never vetoes a regex match', () => {+ it('unions rather than replaces — the map never vetoes a regex match', () => {// Fetched-but-empty (no local VLM reported) still keeps regex matches, and a- // set that omits a model the regex knows must not hide it.- expect(visionLocalModelFilter('llava:latest', ollama, new Set())).toBe(true);- expect(visionLocalModelFilter('llava:latest', ollama, new Set(['gemma4:e4b']))).toBe(true);+ // map that omits a model the regex knows must not hide it.+ expect(visionLocalModelFilter('llava:latest', ollama, { ollama: new Set() })).toBe(true);+ expect(visionLocalModelFilter('llava:latest', ollama, { ollama: new Set(['gemma4:e4b']) })).toBe(true);// ...and it still can't smuggle a text-only model past the filter.- expect(visionLocalModelFilter('qwen2.5-coder:32b', ollama, new Set(['gemma4:e4b']))).toBe(false);+ expect(visionLocalModelFilter('qwen2.5-coder:32b', ollama, { ollama: new Set(['gemma4:e4b']) })).toBe(false);});- it('leaves cloud providers untouched regardless of the authoritative set', () => {- expect(visionLocalModelFilter('gpt-4o', cloud, new Set())).toBe(true);+ it('scopes capabilities to their own backend — an id is not a capability', () => {+ // The same id can be a VLM on one backend and text-only on another; a flat+ // set would mark it eligible for either. LM Studio says it's vision; Ollama+ // never reported it, so on Ollama only the regex may speak (and it says no).+ const lmOnly = { ollama: new Set(), lmstudio: new Set(['shared-id:latest']) };+ expect(visionLocalModelFilter('shared-id:latest', lmstudio, lmOnly)).toBe(true);+ expect(visionLocalModelFilter('shared-id:latest', ollama, lmOnly)).toBe(false);+ });++ it('leaves cloud providers untouched regardless of the authoritative map', () => {+ expect(visionLocalModelFilter('gpt-4o', cloud, { ollama: new Set() })).toBe(true);});it('leaves cloud/API providers untouched (multimodal ids that miss the local regex pass)', () => {