From 8513a9108b10b7aa30eeba69f06464e781287773 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Sun, 19 Jul 2026 10:05:45 +0000 Subject: [PATCH] Studio: drop the redundant deep-research persistence change setCheckpoint already persists Deep Research off for external models at the top of the function, so the added saveBool was a duplicate, and clearing Deep Research from setWebFetchToolsEnabled guarded a state that is not reachable (Deep Research is local-model only while the Web Fetch pill is external-provider only). Revert both to the pre-hardening version. --- .../src/features/chat/stores/chat-runtime-store.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/studio/frontend/src/features/chat/stores/chat-runtime-store.ts b/studio/frontend/src/features/chat/stores/chat-runtime-store.ts index 59bcf085b9..de2095af03 100644 --- a/studio/frontend/src/features/chat/stores/chat-runtime-store.ts +++ b/studio/frontend/src/features/chat/stores/chat-runtime-store.ts @@ -1432,12 +1432,6 @@ export const useChatRuntimeStore = create((set, get) => ({ nextMaxTokens = cap; } } - // Persist Deep Research off when switching to an external model so a refresh - // does not rehydrate it (the adapter requires a selected local model). - // Mirrors setIncognito / clearCheckpoint / the tool-mode setters. - if (isExternalModelId(modelId)) { - saveBool(CHAT_DEEP_RESEARCH_ENABLED_KEY, false); - } return { params: { ...state.params, @@ -1754,12 +1748,7 @@ export const useChatRuntimeStore = create((set, get) => ({ setWebFetchToolsEnabled: (webFetchToolsEnabled) => set(() => { saveBool(CHAT_WEB_FETCH_TOOLS_ENABLED_KEY, webFetchToolsEnabled); - // Deep Research is mutually exclusive with the tool modes; clearing it here - // mirrors the other mode setters so a persisted flag cannot leave both on. - if (webFetchToolsEnabled) saveBool(CHAT_DEEP_RESEARCH_ENABLED_KEY, false); - return webFetchToolsEnabled - ? { webFetchToolsEnabled, deepResearchEnabled: false } - : { webFetchToolsEnabled }; + return { webFetchToolsEnabled }; }), setRagEnabled: (ragEnabled) => set(() => ({ ragEnabled })), setRagSource: (ragSource) =>