Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: take the model name back off the chat rows (#9395)

Michael Hanba16c4e9479b
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index 5c5aa4977d7..ea0bdf58518 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -168,7 +168,6 @@ import {
CONVERSATION_MARKDOWN_LABEL,
type ProjectRecord,
type SidebarItem,
- compareModelDisplayName,
} from "@/features/chat";
import { sandboxSessionIdFor } from "@/components/assistant-ui/sandbox-files";
import {
@@ -2522,17 +2521,6 @@ export function AppSidebar() {
<span className="truncate">
{pendingRename?.id === item.id ? pendingRename.title : item.title}
</span>
- {/* The model the chat was started on. Only in the quiet states: the
- spinner takes the same right-hand slot, and the unread dot sits
- over it. The title truncates first, so this never squeezes it out. */}
- {item.modelId && !showWorkSpinner && !hasUnreadActivity && (
- <span
- className="ml-auto max-w-[45%] shrink-0 truncate text-ui-10 text-muted-foreground/70"
- title={item.modelId}
- >
- {compareModelDisplayName(item.modelId)}
- </span>
- )}
{showWorkSpinner && (
<Spinner
data-testid="chat-row-spinner"
diff --git a/studio/frontend/src/features/chat/hooks/use-chat-sidebar-items.ts b/studio/frontend/src/features/chat/hooks/use-chat-sidebar-items.ts
index 69236cf30f8..f59ff9be720 100644
--- a/studio/frontend/src/features/chat/hooks/use-chat-sidebar-items.ts
+++ b/studio/frontend/src/features/chat/hooks/use-chat-sidebar-items.ts
@@ -36,8 +36,6 @@ export interface SidebarItem {
updatedAt: number;
isFork?: boolean;
projectId?: string | null;
- /** The model this chat was started on. Single rows only: a compare row runs two. */
- modelId?: string;
}
function lastActivityAt(thread: ThreadRecord): number {
@@ -89,8 +87,6 @@ export function groupThreads(
updatedAt: lastActivityAt(t),
isFork: Boolean(t.forkedFromThreadId),
projectId: t.projectId ?? null,
- // Stamped at creation. Blank on a legacy row, which reads as unknown.
- modelId: t.modelId || undefined,
});
}
}
diff --git a/studio/frontend/tests/chat-remembers-its-model.test.ts b/studio/frontend/tests/chat-remembers-its-model.test.ts
index 173219cadf4..a501d795738 100644
--- a/studio/frontend/tests/chat-remembers-its-model.test.ts
+++ b/studio/frontend/tests/chat-remembers-its-model.test.ts
@@ -3,9 +3,9 @@
// Every thread row has carried modelId since long before this notice, so the model a chat
// was started on is already known for chats that already exist. What was missing was
-// showing it and offering it back. The rules below are the ones that keep the offer from
-// becoming a nuisance: it never loads anything on its own, and it stays quiet whenever it
-// could not be honoured.
+// offering it back. The rules below are the ones that keep the offer from becoming a
+// nuisance: it never loads anything on its own, and it stays quiet whenever it could not
+// be honoured.
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
@@ -20,8 +20,6 @@ function read(path: string): string {
const notice = read("../src/features/chat/components/chat-model-notice.tsx");
const page = read("../src/features/chat/chat-page.tsx");
-const sidebar = read("../src/components/app-sidebar.tsx");
-const items = read("../src/features/chat/hooks/use-chat-sidebar-items.ts");
const thread = read("../src/components/assistant-ui/thread.tsx");
const researchPanel = read(
"../src/features/chat/components/research-activity-panel.tsx",
@@ -36,26 +34,8 @@ function slice(source: string, from: string, to: string): string {
return source.slice(start, end);
}
-// Source assertions: use-chat-sidebar-items reaches chat-api, and the label helper reaches
-// external-providers, neither of which resolves in a bare node test. The sibling
-// thread-scoped suites do the same for the same reason.
-
-test("a single chat row carries the model it was started on", () => {
- const single = slice(items, 'type: "single",', "});");
- assert.match(single, /modelId: t\.modelId \|\| undefined,/);
-});
-
-test("a legacy row with no model reads as unknown rather than empty string", () => {
- // db.ts backfills "" onto old records, and "" would render an empty label.
- assert.match(items, /modelId: t\.modelId \|\| undefined,/);
- assert.doesNotMatch(items, /modelId: t\.modelId,/);
-});
-
-test("a compare row carries no single model", () => {
- // Two panes, two models: there is no honest one to show, so the field is absent.
- const compare = slice(items, 'type: "compare",', "};");
- assert.doesNotMatch(compare, /modelId/);
-});
+// Source assertions: the notice reaches external-providers, which does not resolve in a
+// bare node test. The sibling thread-scoped suites do the same for the same reason.
test("the notice never switches a model on its own", () => {
// Opening a chat must not evict what is resident: a local load is multi-gigabyte.
@@ -254,20 +234,6 @@ test("the canvas panel reserves the notice's height too", () => {
);
});
-test("the sidebar label cannot collide with the spinner or the unread dot", () => {
- // Both take the same right-hand slot, and the dot is positioned over it.
- assert.match(
- sidebar,
- /\{item\.modelId && !showWorkSpinner && !hasUnreadActivity && \(/,
- );
- // The title truncates first, so a long model name never squeezes it out.
- const label = sidebar.slice(
- sidebar.indexOf("{item.modelId && !showWorkSpinner"),
- );
- assert.match(label.slice(0, 400), /max-w-\[45%\]/);
- assert.match(label.slice(0, 400), /compareModelDisplayName\(item\.modelId\)/);
-});
-
test("a chat started as New Chat gets the notice once its row exists", () => {
// ?new=<nonce> carries no thread in the URL and keeps none after the first send, so
// the notice saw nothing until the chat was reopened. The store's id is only this