From 2325728f3f02cd0ffa46965381920dad0499ff7f Mon Sep 17 00:00:00 2001 From: Rohit C Prasad Date: Fri, 24 Jul 2026 12:48:38 -0700 Subject: [PATCH] Pin the Ollama probe in the curated-models test The picker gates ollama:* on a live local probe, so this passed only where Ollama runs and failed in CI. The probe's own behaviour stays covered by test_ollama_models_gated_on_liveness. --- tests/test_provider_router.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_provider_router.py b/tests/test_provider_router.py index 12cbb982..81e53d30 100644 --- a/tests/test_provider_router.py +++ b/tests/test_provider_router.py @@ -322,6 +322,12 @@ def test_manager_curated_models(tmp_path, monkeypatch): monkeypatch.delenv(d.env_key, raising=False) from coworker.server.manager import SessionManager + # `ollama:*` selectability is an HTTP probe of a local server; pin it so this test + # covers picker mechanics only (the probe itself is covered by + # test_settings.py::test_ollama_models_gated_on_liveness). Unpinned, the ollama + # assertions below pass only where Ollama happens to run — green on a dev box, red in CI. + monkeypatch.setattr(SessionManager, "_ollama_alive", lambda self: True) + mgr = SessionManager(data_dir=tmp_path) # no provider keys → nothing but the always-selectable default assert mgr.get_settings()["models"] == [mgr.model]