diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx index 953c77a680..6951a8fdd6 100644 --- a/studio/frontend/src/features/chat/chat-page.tsx +++ b/studio/frontend/src/features/chat/chat-page.tsx @@ -595,20 +595,21 @@ export function ChatPage(): ReactElement { useEffect(() => { if (getTrainingCompareHandoff()) return; - void refresh(); - void listLocalModels().then((res) => { - setLocalModels( - res.models - .filter((m) => m.source === "lmstudio" || m.source === "models_dir") - .map((m) => ({ - id: m.id, - name: m.display_name, - baseModel: m.source === "lmstudio" ? "LM Studio" : "Local models", - updatedAt: m.updated_at ?? undefined, - source: "local" as const, - })), - ); - }).catch(() => {}); + void refresh().then(() => { + listLocalModels().then((res) => { + setLocalModels( + res.models + .filter((m) => m.source === "lmstudio" || m.source === "models_dir") + .map((m) => ({ + id: m.id, + name: m.display_name, + baseModel: m.source === "lmstudio" ? "LM Studio" : "Local models", + updatedAt: m.updated_at ?? undefined, + source: "local" as const, + })), + ); + }).catch(() => {}); + }); }, [refresh]); useEffect(() => {