From 4fe887fe58b1b09de2c99d60af814dad63fdc3bb Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Sun, 20 Sep 2026 14:23:18 +0530 Subject: [PATCH] test: pin the OpenRouter memo empty in the no-socket test; import hygiene (gate r2 nits) --- tests/gateway/test_model_command_async_offload.py | 2 -- tests/hermes_cli/test_list_picker_providers.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/gateway/test_model_command_async_offload.py b/tests/gateway/test_model_command_async_offload.py index da7a337aa8..6a763ade47 100644 --- a/tests/gateway/test_model_command_async_offload.py +++ b/tests/gateway/test_model_command_async_offload.py @@ -140,8 +140,6 @@ async def test_picker_path_offloads_list_picker_providers(_isolated_config, monk ) - - @pytest.mark.asyncio async def test_picker_path_lists_cache_only_and_probes_only_the_current_custom_endpoint(_isolated_config, monkeypatch): """#74003: the chat ``/model`` reply is a read path. The listing must ask for cache-only catalogs diff --git a/tests/hermes_cli/test_list_picker_providers.py b/tests/hermes_cli/test_list_picker_providers.py index 657926230e..0e08bbeb76 100644 --- a/tests/hermes_cli/test_list_picker_providers.py +++ b/tests/hermes_cli/test_list_picker_providers.py @@ -17,6 +17,7 @@ network or auth state is required. import pytest from hermes_cli import model_switch +import hermes_cli.models as models_mod import hermes_cli.model_switch_providers as hermes_cli_model_switch_providers from hermes_cli import model_switch_providers @@ -246,9 +247,8 @@ def test_non_blocking_listing_opens_no_socket(monkeypatch, tmp_path): """#74003: ``non_blocking_catalogs=True`` must not run a single live catalog probe in the calling thread — not the per-provider ``/models`` prefetch and not OpenRouter's curated-catalog GET — even with several credentialed providers and an empty on-disk cache.""" - import hermes_cli.models as models_mod - monkeypatch.setenv("HERMES_HOME", str(tmp_path)) + monkeypatch.setattr(models_mod, "_openrouter_catalog_cache", None) for key in ("OPENAI_API_KEY", "ANTHROPIC_API_KEY", "DEEPSEEK_API_KEY", "GROQ_API_KEY", "MISTRAL_API_KEY", "XAI_API_KEY", "OPENROUTER_API_KEY"): monkeypatch.setenv(key, "dummy")