From 24fdbb81df35a164c2fa17f4a5d26915d1f29174 Mon Sep 17 00:00:00 2001 From: Dmitry <1315874+dniku@users.noreply.github.com> Date: Wed, 17 Jun 2026 11:17:31 +0100 Subject: [PATCH] Fix Open WebUI tests in offline mode Open WebUI 0.9.6 still initializes its embedding function during startup, even when OFFLINE_MODE=true and BYPASS_EMBEDDING_AND_RETRIEVAL=true. With OFFLINE_MODE=true and no cached SentenceTransformer model, startup failed with: ValueError: No embedding model is loaded. Set RAG_EMBEDDING_MODEL to a valid SentenceTransformer model name, or configure an external RAG_EMBEDDING_ENGINE (ollama, openai, azure_openai). Configure the tests to use a dummy Ollama embedding endpoint so startup does not try to load or download a local embedding model. The endpoint is not meant to be contacted by these tests; it only keeps startup on the external embedding configuration path. --- test/services/open-webui.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/services/open-webui.nix b/test/services/open-webui.nix index 0d828ef..069ff1b 100644 --- a/test/services/open-webui.nix +++ b/test/services/open-webui.nix @@ -35,7 +35,13 @@ let inherit (config.test) subdomain domain; }; # Speeds up tests because models can't be downloaded anyway and that leads to retries. - services.open-webui.environment.OFFLINE_MODE = "true"; + services.open-webui.environment = { + OFFLINE_MODE = "true"; + BYPASS_EMBEDDING_AND_RETRIEVAL = "true"; + RAG_EMBEDDING_ENGINE = "ollama"; + RAG_EMBEDDING_MODEL = "dummy"; + RAG_OLLAMA_BASE_URL = "http://127.0.0.1:9"; + }; networking.hosts = { "127.0.0.1" = [ "${config.test.subdomain}.${config.test.domain}" ];