diff --git a/tests/hermes_cli/test_list_picker_providers.py b/tests/hermes_cli/test_list_picker_providers.py index 480d42aa160..a2042a96db5 100644 --- a/tests/hermes_cli/test_list_picker_providers.py +++ b/tests/hermes_cli/test_list_picker_providers.py @@ -19,6 +19,12 @@ import pytest from hermes_cli import model_switch +@pytest.fixture(autouse=True) +def _disable_live_custom_provider_model_probe(monkeypatch): + """Keep custom-provider picker fixtures independent of local model servers.""" + monkeypatch.setattr("hermes_cli.models.fetch_api_models", lambda *_a, **_kw: None) + + def _make_provider(slug, name=None, models=None, *, is_current=False, is_user_defined=False, source="built-in", api_url=None): """Build a dict shaped like ``list_authenticated_providers`` output.""" diff --git a/tests/hermes_cli/test_model_switch_custom_providers.py b/tests/hermes_cli/test_model_switch_custom_providers.py index a1f03bfcad6..91c4858ab03 100644 --- a/tests/hermes_cli/test_model_switch_custom_providers.py +++ b/tests/hermes_cli/test_model_switch_custom_providers.py @@ -6,6 +6,7 @@ only looked at `providers:`. """ import hermes_cli.providers as providers_mod +import pytest from hermes_cli.model_switch import list_authenticated_providers, switch_model from hermes_cli.providers import resolve_provider_full @@ -18,6 +19,12 @@ _MOCK_VALIDATION = { } +@pytest.fixture(autouse=True) +def _disable_live_custom_provider_model_probe(monkeypatch): + """Keep custom-provider picker fixtures independent of local model servers.""" + monkeypatch.setattr("hermes_cli.models.fetch_api_models", lambda *_a, **_kw: None) + + def test_list_authenticated_providers_includes_custom_providers(monkeypatch): """No-args /model menus should include saved custom_providers entries.""" monkeypatch.setattr("agent.models_dev.fetch_models_dev", lambda: {})