mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-01 12:02:05 +00:00
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.
This commit is contained in:
parent
27f03243a0
commit
f34cf7e3a4
1 changed files with 6 additions and 0 deletions
|
|
@ -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"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue