mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-30 17:11:20 -05:00
[PR #21406] [CLOSED] fix: offline model retrieval, re-raise to disable instead of returning useless fallback #113381
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21406
Author: @ahxxm
Created: 2/14/2026
Status: ❌ Closed
Base:
dev← Head:patch-1📝 Commits (1)
3c78a4aoffline model retrieval: re-raise instead of returning useless fallback📊 Changes
1 file changed (+2 additions, -0 deletions)
View changed files
📝
backend/open_webui/retrieval/utils.py(+2 -0)📄 Description
In offline mode (
OFFLINE_MODE=True),get_model_pathnot-so-silently returns the raw model name string as a fallback. This fallback exists such thatSentenceTransformercan try to download a model, but whenOFFLINE_MODE=Truedownload is blocked, SentenceTransformer emitsWARNI: No sentence-transformers model found ... Creating a new one with mean pooling, making retrieval feature appear useful, but not really so.The fix is re-raise the exception in offline mode. Caller chain already handles this:
get_ef()catches, returnsNoneget_rf()catches, re-raises tomain.py:1072-1074ef=None. Retrieval is disabled until a model is pre-cached orRAG_EMBEDDING_ENGINEsetup.closes #21405
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.