From 5351822ff87825863ccd8ca177f8e2b14539bfac Mon Sep 17 00:00:00 2001 From: Roland Tannous Date: Tue, 26 May 2026 21:03:51 +0400 Subject: [PATCH] Studio: default RAG mode to multimodal everywhere --- studio/backend/core/rag/scope.py | 2 +- studio/backend/routes/rag.py | 8 ++++---- studio/frontend/src/features/chat/chat-settings-sheet.tsx | 2 +- .../src/features/rag/components/kb-create-dialog.tsx | 4 ++-- .../src/features/rag/components/rag-defaults-section.tsx | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/studio/backend/core/rag/scope.py b/studio/backend/core/rag/scope.py index 054915ce24..0049d3be1c 100644 --- a/studio/backend/core/rag/scope.py +++ b/studio/backend/core/rag/scope.py @@ -38,7 +38,7 @@ def resolve_scope_embedder(scope: str) -> str | None: explicit = per_thread.get("embedding_model") or defaults.get("embedding_model") if explicit: return explicit - mode = per_thread.get("mode") or defaults.get("mode") or "text" + mode = per_thread.get("mode") or defaults.get("mode") or "multimodal" chunking_strategy = ( per_thread.get("chunking_strategy") or defaults.get("chunking_strategy") diff --git a/studio/backend/routes/rag.py b/studio/backend/routes/rag.py index a45fb0d128..022e5ddb16 100644 --- a/studio/backend/routes/rag.py +++ b/studio/backend/routes/rag.py @@ -66,7 +66,7 @@ class CreateKBRequest(BaseModel): description: str | None = None embedding_model: str | None = None chunking_strategy: ChunkingStrategy = "standard" - mode: KBMode = "text" + mode: KBMode = "multimodal" class KBResponse(BaseModel): @@ -401,7 +401,7 @@ def list_knowledge_bases( class RagDefaults(BaseModel): chunking_strategy: ChunkingStrategy = "standard" - mode: KBMode = "text" + mode: KBMode = "multimodal" embedding_model: str | None = None @@ -423,7 +423,7 @@ def _load_rag_defaults() -> RagDefaults: raw = {} return RagDefaults( chunking_strategy = raw.get("chunking_strategy") or "standard", - mode = raw.get("mode") or "text", + mode = raw.get("mode") or "multimodal", embedding_model = raw.get("embedding_model"), ) @@ -470,7 +470,7 @@ def set_rag_defaults( class ThreadRagSettings(BaseModel): chunking_strategy: ChunkingStrategy = "standard" - mode: KBMode = "text" + mode: KBMode = "multimodal" embedding_model: str | None = None diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx index 175c878740..51eb079312 100644 --- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx +++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx @@ -484,7 +484,7 @@ export function ChatSettingsPanel({ ragDefaults?.chunking_strategy ?? "standard"; const effectiveThreadMode: KBMode = - threadSettings?.mode ?? ragDefaults?.mode ?? "text"; + threadSettings?.mode ?? ragDefaults?.mode ?? "multimodal"; const aui = useAui(); // Brand-new chat has no backend thread yet — initialize the local diff --git a/studio/frontend/src/features/rag/components/kb-create-dialog.tsx b/studio/frontend/src/features/rag/components/kb-create-dialog.tsx index c314e59753..c82e665a7f 100644 --- a/studio/frontend/src/features/rag/components/kb-create-dialog.tsx +++ b/studio/frontend/src/features/rag/components/kb-create-dialog.tsx @@ -43,7 +43,7 @@ export function KBCreateDialog({ const initialStrategy: ChunkingStrategy = defaults?.chunking_strategy ?? "standard"; - const initialMode: KBMode = defaults?.mode ?? "text"; + const initialMode: KBMode = defaults?.mode ?? "multimodal"; const initialEmbedder = defaults?.embedding_model ?? ""; const [name, setName] = useState(""); @@ -76,7 +76,7 @@ export function KBCreateDialog({ setDescription(""); setEmbeddingModel(defaults?.embedding_model ?? ""); setChunkingStrategy(defaults?.chunking_strategy ?? "standard"); - setMode(defaults?.mode ?? "text"); + setMode(defaults?.mode ?? "multimodal"); setError(null); setSubmitting(false); }; diff --git a/studio/frontend/src/features/rag/components/rag-defaults-section.tsx b/studio/frontend/src/features/rag/components/rag-defaults-section.tsx index e9536840f6..a8f5dafd0a 100644 --- a/studio/frontend/src/features/rag/components/rag-defaults-section.tsx +++ b/studio/frontend/src/features/rag/components/rag-defaults-section.tsx @@ -22,7 +22,7 @@ export function RagDefaultsSection() { const [chunkingStrategy, setChunkingStrategy] = useState("standard"); - const [mode, setMode] = useState("text"); + const [mode, setMode] = useState("multimodal"); const [embeddingModel, setEmbeddingModel] = useState(""); const [error, setError] = useState(null);