ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
fix(dashboard-api): don't make readiness wait for a switched-off Open WebUI (#8301)
Mike Bradley3238b1c1136f
diff --git a/ods/extensions/services/dashboard-api/main.py b/ods/extensions/services/dashboard-api/main.pyindex 601893a8d..ad5c97197 100644--- a/ods/extensions/services/dashboard-api/main.py+++ b/ods/extensions/services/dashboard-api/main.py@@ -350,16 +350,30 @@ def _build_readiness_payload(if not chat_ready and not bootstrap_info.active and not engine_starting else None),))- webui_ready = _service_is_healthy(service_statuses, "open-webui")- checks.append(_readiness_check(- check_id="open-webui",- name="Open WebUI",- required=True,- ready=webui_ready,- status="ready" if webui_ready else "blocked",- detail="Open WebUI is reachable" if webui_ready else "Open WebUI is not healthy",- repair="ods restart open-webui" if not webui_ready else None,- ))+ webui = _service_by_id(service_statuses, "open-webui")+ if webui is not None and webui.status == "not_deployed":+ # The install switched Open WebUI off (ENABLE_OPEN_WEBUI; Portal is+ # the chat app on fresh Pixel installs): nothing waits for it, and+ # restarting a service the install leaves out repairs nothing.+ checks.append(_readiness_check(+ check_id="open-webui",+ name="Open WebUI",+ required=False,+ ready=False,+ status="disabled",+ detail="Open WebUI is switched off in this install",+ ))+ else:+ webui_ready = _service_is_healthy(service_statuses, "open-webui")+ checks.append(_readiness_check(+ check_id="open-webui",+ name="Open WebUI",+ required=True,+ ready=webui_ready,+ status="ready" if webui_ready else "blocked",+ detail="Open WebUI is reachable" if webui_ready else "Open WebUI is not healthy",+ repair="ods restart open-webui" if not webui_ready else None,+ ))checks.append(_readiness_check(check_id="dashboard-api",diff --git a/ods/extensions/services/dashboard-api/tests/test_main.py b/ods/extensions/services/dashboard-api/tests/test_main.pyindex bed99c7d3..b2fad4a50 100644--- a/ods/extensions/services/dashboard-api/tests/test_main.py+++ b/ods/extensions/services/dashboard-api/tests/test_main.py@@ -456,6 +456,55 @@ class TestReadinessPayload:assert result["canUseVoice"] is Falseassert any(check["id"] == "voice" and check["status"] == "disabled" for check in result["checks"])+ def test_switched_off_open_webui_is_disabled_not_blocking(self):+ # Workstation06 (10-27): a fresh Pixel install leaves Open WebUI out+ # (ENABLE_OPEN_WEBUI=false), and readiness read "blocked" with the+ # repair "ods restart open-webui" while chat was ready.+ from models import BootstrapStatus, ServiceStatus++ statuses = [+ ServiceStatus(id="llama-server", name="LLM", port=8080, external_port=8080, status="healthy"),+ ServiceStatus(id="open-webui", name="Open WebUI", port=3000, external_port=3000, status="not_deployed"),+ ]++ result = _build_readiness_payload(+ service_statuses=statuses,+ loaded_model="Test-32B",+ context_size=32768,+ bootstrap_info=BootstrapStatus(active=False),+ host_agent={"available": True},+ stt_model_cached=None,+ stt_model_name="Systran/faster-whisper-base",+ )++ webui = next(check for check in result["checks"] if check["id"] == "open-webui")+ assert result["ready"] is True and result["status"] == "ready"+ assert webui["status"] == "disabled" and webui["required"] is False+ assert webui.get("repair") is None+ assert "ods restart open-webui" not in result.get("repairHints", [])++ def test_unhealthy_deployed_open_webui_still_blocks(self):+ from models import BootstrapStatus, ServiceStatus++ statuses = [+ ServiceStatus(id="llama-server", name="LLM", port=8080, external_port=8080, status="healthy"),+ ServiceStatus(id="open-webui", name="Open WebUI", port=3000, external_port=3000, status="unhealthy"),+ ]++ result = _build_readiness_payload(+ service_statuses=statuses,+ loaded_model="Test-32B",+ context_size=32768,+ bootstrap_info=BootstrapStatus(active=False),+ host_agent={"available": True},+ stt_model_cached=None,+ stt_model_name="Systran/faster-whisper-base",+ )++ webui = next(check for check in result["checks"] if check["id"] == "open-webui")+ assert result["ready"] is False+ assert webui["status"] == "blocked" and webui["required"] is True+def test_missing_model_blocks_chat(self):from models import BootstrapStatus, ServiceStatus