Skip to content

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

feat: show image analysis in mind model options

[._.]/ Adam Eivy23c3d788bf96
diff --git a/client/src/components/ProviderModelSelector.jsx b/client/src/components/ProviderModelSelector.jsx
index 8bf050639b..a41eaef560 100644
--- a/client/src/components/ProviderModelSelector.jsx
+++ b/client/src/components/ProviderModelSelector.jsx
@@ -121,11 +121,12 @@ import {
providerModelList,
selectableProviders,
localToolUseHint,
- withToolUseOptionLabel,
+ withModelCapabilityOptionLabel,
} from '../utils/providers.js';
import { groupProvidersByHarness } from '../utils/providerHarnesses.js';
import { isCompositeProviderId } from '../utils/providerRef.js';
import useToolUseModelIds from '../hooks/useToolUseModelIds.js';
+import useVisionModelIds from '../hooks/useVisionModelIds.js';
import useProviderCatalog from '../hooks/useProviderCatalog.js';
import EffortSelect from './cos/EffortSelect.jsx';
import ProviderComposePopover from './providers/ProviderComposePopover.jsx';
@@ -165,6 +166,7 @@ export default function ProviderModelSelector({
includeDefaultModel = false,
layout = 'row',
highlightToolUse = false,
+ highlightVision = false,
effort,
onEffortChange,
selectionPolicy,
@@ -221,12 +223,14 @@ export default function ProviderModelSelector({
// capability scan; the fetch is module-shared, so a list page rendering one
// selector per row still issues a single request.
const { idsByProvider: toolUseIdsByProvider, loaded: toolUseLoaded } = useToolUseModelIds(highlightToolUse);
+ const { idsByProvider: visionIdsByProvider, loaded: visionLoaded } = useVisionModelIds(highlightVision);
// Nothing is asserted until the scan settles (success OR failure). Annotating
// mid-fetch would show the exact false "⚠ no known tool use" this union exists
// to remove, only for it to vanish a beat later; a failed fetch settles too, so
// an unreachable backend degrades to the regex-only labels rather than muting
// the annotation forever.
const annotateToolUse = highlightToolUse && toolUseLoaded;
+ const annotateVision = highlightVision && visionLoaded;
const toolHint = annotateToolUse ? localToolUseHint(effectiveModel, selectedProvider, toolUseIdsByProvider) : null;
const toolIncapable = toolHint?.toolCapable === false;
// Only offer enabled, hardware-compatible, policy-allowed providers; the
@@ -421,8 +425,13 @@ export default function ProviderModelSelector({
const hardwareUnavailable = !isProviderModelHardwareCompatible(selectedProvider, opt.value);
const policyDisallowed = Boolean(modelAllowed && !modelAllowed(m, selectedProvider));
const unavailable = hardwareUnavailable || policyDisallowed;
- const label = annotateToolUse
- ? withToolUseOptionLabel(opt.value, opt.label, selectedProvider, toolUseIdsByProvider)
+ const label = annotateToolUse || annotateVision
+ ? withModelCapabilityOptionLabel(opt.value, opt.label, selectedProvider, {
+ toolUseIdsByProvider: annotateToolUse ? toolUseIdsByProvider : null,
+ visionIdsByProvider: annotateVision ? visionIdsByProvider : null,
+ includeToolUse: annotateToolUse,
+ includeVision: annotateVision,
+ })
: opt.label;
return (
<option key={opt.value} value={opt.value} disabled={unavailable}>
diff --git a/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx b/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx
index 274ee2b6eb..c450d5f92d 100644
--- a/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx
+++ b/client/src/components/cos/PersistentMindTaskModelAllowlistControls.jsx
@@ -149,6 +149,8 @@ export default function PersistentMindTaskModelAllowlistControls({
disabled={disabled || saving}
modelDisabled={!provider}
alwaysShowModel
+ highlightToolUse
+ highlightVision
compose={false}
onProviderChange={(providerId) => updateEntry(index, { providerId })}
onModelChange={(model) => updateEntry(index, { model })}
diff --git a/client/src/utils/localModelHeuristics.js b/client/src/utils/localModelHeuristics.js
index ca46ef0b5d..fd95a2e731 100644
--- a/client/src/utils/localModelHeuristics.js
+++ b/client/src/utils/localModelHeuristics.js
@@ -113,6 +113,27 @@ export const withToolUseOptionLabel = (id, label, provider, toolUseIdsByProvider
return `${label}${hint.toolCapable ? ' · 🔧 tool use' : ' · ⚠ no known tool use'}`;
};
+/**
+ * Annotate a native model option with the capabilities the picker knows about.
+ * Keep the decoration here so model selectors do not each invent their own
+ * capability wording or combine tool and image-analysis signals differently.
+ */
+export const withModelCapabilityOptionLabel = (
+ id,
+ label,
+ provider,
+ { toolUseIdsByProvider = null, visionIdsByProvider = null, includeToolUse = true, includeVision = true } = {},
+) => {
+ const badges = [];
+ const toolHint = localToolUseHint(id, provider, toolUseIdsByProvider);
+ if (includeToolUse && toolHint) badges.push(toolHint.toolCapable ? '🔧 tool use' : '⚠ no known tool use');
+ const visionCapable = isVisionCapableCliProvider(provider)
+ || (localBackendForProvider(provider)
+ && (visionIdsByProvider?.[provider?.id]?.has(id) === true || isVisionModel(id)));
+ if (includeVision && visionCapable) badges.push('🖼 image analysis');
+ return badges.length ? `${label} · ${badges.join(' · ')}` : label;
+};
+
/**
* Selectable models for a generation/chat picker: drops internal sentinels AND
* embedding-only models. Use anywhere the user picks a model that will run a
diff --git a/client/src/utils/providers.test.js b/client/src/utils/providers.test.js
index b694617dd6..4555eaffe0 100644
--- a/client/src/utils/providers.test.js
+++ b/client/src/utils/providers.test.js
@@ -32,6 +32,7 @@ import {
PUBLIC_REVIEW_NO_TOOL_POSTURE,
localToolUseHint,
withToolUseOptionLabel,
+ withModelCapabilityOptionLabel,
localBackendForProvider,
knownProviderContextWindow,
CODEX_CONTEXT_WINDOW,
@@ -1111,6 +1112,22 @@ describe('withToolUseOptionLabel', () => {
});
});
+describe('withModelCapabilityOptionLabel', () => {
+ it('combines tool-use and image-analysis badges from shared capability maps', () => {
+ const provider = { id: 'ollama', name: 'Ollama' };
+ expect(withModelCapabilityOptionLabel('example-vlm', 'Example VLM', provider, {
+ toolUseIdsByProvider: { ollama: new Set(['example-vlm']) },
+ visionIdsByProvider: { ollama: new Set(['example-vlm']) },
+ })).toBe('Example VLM · 🔧 tool use · 🖼 image analysis');
+ });
+
+ it('marks CLI providers with image analysis without model-specific metadata', () => {
+ expect(withModelCapabilityOptionLabel('example-model', 'Example model', { type: 'cli', command: 'claude' }, {
+ includeToolUse: false,
+ })).toBe('Example model · 🖼 image analysis');
+ });
+});
+
describe('localBackendForProvider', () => {
it('detects Ollama by id, endpoint, or name', () => {
expect(localBackendForProvider({ id: 'ollama' })).toBe('ollama');
@@ -2316,4 +2333,3 @@ describe('isFleetHostConfigured', () => {
expect(isFleetHostConfigured(host, providers)).toBe(false);
});
});
-