From 5c55ccf39f9f92d48408ec8a2e47bf6dfd18ed10 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 21 Nov 2026 15:36:46 +0100 Subject: [PATCH] fix: knowledge search fails silently after an embedding size change (#34764) With the default Chroma vector database, a failed knowledge search was dropped without a trace. The common case is switching to an embedding model with a different vector size without reindexing. Every search then came back empty, and neither the response nor the server log said why. The error, including Chroma's dimension mismatch message, now shows up in the server log, so an admin can see that a reindex is needed. Search results themselves do not change, and a knowledge base with no files yet still stays quiet. Fixes #34761 --- backend/open_webui/retrieval/vector/dbs/chroma.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/open_webui/retrieval/vector/dbs/chroma.py b/backend/open_webui/retrieval/vector/dbs/chroma.py index 5c5d9602e8..58cb66d66c 100755 --- a/backend/open_webui/retrieval/vector/dbs/chroma.py +++ b/backend/open_webui/retrieval/vector/dbs/chroma.py @@ -105,7 +105,10 @@ class ChromaClient(VectorDBBase): } ) return None + except NotFoundError: + return None except Exception as e: + log.exception('Error searching collection %s: %s', collection_name, e) return None def query(self, collection_name: str, filter: dict, limit: Optional[int] = None) -> Optional[GetResult]: