The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(chat): add per-composer model override via assistant-ui-style control
Steven Enamakel0d62485bf7e4
diff --git a/app/src/components/chat/ChatComposer.tsx b/app/src/components/chat/ChatComposer.tsxindex b08aa19ece..fda8a45369 100644--- a/app/src/components/chat/ChatComposer.tsx+++ b/app/src/components/chat/ChatComposer.tsx@@ -105,6 +105,9 @@ export interface ChatComposerProps {* omit it and render exactly as before.*/mascotDock?: React.ReactNode;+ /** Per-composer model route selected from the assistant-ui-style control. */+ modelOverride?: string | null;+ onModelOverrideChange?: (value: string) => void;}/**@@ -192,6 +195,8 @@ function ChatComposerBody({placeholder,headerSlots = [],mascotDock,+ modelOverride,+ onModelOverrideChange,}: ChatComposerProps) {const { t } = useT();const [isDragging, setIsDragging] = useState(false);@@ -431,7 +436,11 @@ function ChatComposerBody({{/* Read-only model chip. Carries the only text label in the row, soit is the element that must give way when space runs out — seeits own `min-w-0` + truncating name span. */}- <ModelQualityPill className="min-w-0" />+ <ModelQualityPill+ className="min-w-0"+ value={modelOverride}+ onValueChange={onModelOverrideChange}+ /></div>{/* Right group — mic, then the primary send/stop action. */}diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsxindex 275d1e80bc..a363802982 100644--- a/app/src/features/conversations/Conversations.tsx+++ b/app/src/features/conversations/Conversations.tsx@@ -449,6 +449,9 @@ const Conversations = ({onCancel: () => {},});const [resolvedModel, setResolvedModel] = useState<string | null>(null);+ // A picker choice belongs to this composer session. It overrides the active+ // profile route for subsequent sends without mutating the shared profile.+ const [composerModelOverride, setComposerModelOverride] = useState<string | null>(null);// Whether the resolved model for the active profile accepts image input.// Managed tiers do; custom/BYOK models only when the user flagged them. Gates// the composer's image-attachment affordance (docs flow regardless). Resolved@@ -1082,7 +1085,9 @@ const Conversations = ({await whenSuperContextWriteSettled();const pendingAttachments = attachments.slice();const modelOverride =- agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ?? CHAT_MODEL_HINT;+ composerModelOverride ??+ agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ??+ CHAT_MODEL_HINT;const messageText = buildMessageWithAttachments(trimmed, pendingAttachments);const userMessage: ThreadMessage = {id: `msg_${globalThis.crypto.randomUUID()}`,@@ -1209,7 +1214,9 @@ const Conversations = ({const pendingAttachments = attachments.slice();const modelOverride =- agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ?? CHAT_MODEL_HINT;+ composerModelOverride ??+ agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ??+ CHAT_MODEL_HINT;const messageText = buildMessageWithAttachments(normalized, pendingAttachments);const userMessage: ThreadMessage = {id: `msg_${globalThis.crypto.randomUUID()}`,@@ -1288,7 +1295,9 @@ const Conversations = ({if (!normalized && pendingAttachments.length === 0) return;const modelOverride =- agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ?? CHAT_MODEL_HINT;+ composerModelOverride ??+ agentProfiles.find(p => p.id === selectedAgentProfileId)?.modelOverride ??+ CHAT_MODEL_HINT;const messageText = buildMessageWithAttachments(normalized, pendingAttachments);// Build the full user message exactly like a normal send (content +// attachment metadata) so the follow-up persists identically when it is@@ -2406,6 +2415,8 @@ const Conversations = ({<ThreadGoalEditorPanel key="thread-goal" ctl={threadGoal} />,]}mascotDock={mascotDock}+ modelOverride={composerModelOverride ?? resolvedModel}+ onModelOverrideChange={setComposerModelOverride}/></>) : (