Studio: default RAG mode to multimodal everywhere

This commit is contained in:
Roland Tannous 2026-05-26 21:03:51 +04:00
commit 5351822ff8
5 changed files with 9 additions and 9 deletions

View file

@ -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")

View file

@ -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

View file

@ -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

View file

@ -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);
};

View file

@ -22,7 +22,7 @@ export function RagDefaultsSection() {
const [chunkingStrategy, setChunkingStrategy] =
useState<ChunkingStrategy>("standard");
const [mode, setMode] = useState<KBMode>("text");
const [mode, setMode] = useState<KBMode>("multimodal");
const [embeddingModel, setEmbeddingModel] = useState("");
const [error, setError] = useState<string | null>(null);