From f34cf7e3a40b44c908ebf47be458269b63dd4163 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Sun, 28 Jun 2026 18:05:28 -0500 Subject: [PATCH] test(gmi): stub profile fetch_models in static-fallback test The fallback test only mocked fetch_api_models; CI still hit the real GMI /v1/models endpoint via ProviderProfile.fetch_models and merged live models into the result. --- tests/hermes_cli/test_gmi_provider.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hermes_cli/test_gmi_provider.py b/tests/hermes_cli/test_gmi_provider.py index 86aaf699bf6..7f1be8df9c8 100644 --- a/tests/hermes_cli/test_gmi_provider.py +++ b/tests/hermes_cli/test_gmi_provider.py @@ -118,6 +118,12 @@ class TestGmiModelCatalog: }, ) monkeypatch.setattr("hermes_cli.models.fetch_api_models", lambda api_key, base_url: None) + # Generic profile path uses ProviderProfile.fetch_models (urllib), not + # fetch_api_models — must stub it or CI can hit the real endpoint. + monkeypatch.setattr( + "providers.base.ProviderProfile.fetch_models", + lambda self, *, api_key=None, base_url=None, timeout=8.0: None, + ) assert provider_model_ids("gmi") == list(_PROVIDER_MODELS["gmi"])