From 0b851cf55a3ab715550970756733501beb8282ac Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:52:31 +0100 Subject: [PATCH] fix: offline model retrieval, re-raise to disable instead of returning useless fallback (#22106) Co-authored-by: ahxxm <1286225+ahxxm@users.noreply.github.com> --- backend/open_webui/retrieval/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index 82896f00f..86b4acc06 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -1306,6 +1306,8 @@ def get_model_path(model: str, update_model: bool = False): return model_repo_path except Exception as e: log.exception(f"Cannot determine model snapshot path: {e}") + if OFFLINE_MODE: + raise return model