Skip to content

The agent that grows with you

fix(providers): listed filter reads the live provider table; parity covers the hidden case

Tekniume3084288b434
diff --git a/hermes_cli/models_catalog_static.py b/hermes_cli/models_catalog_static.py
index 1f1e41c805f..d02909a6395 100644
--- a/hermes_cli/models_catalog_static.py
+++ b/hermes_cli/models_catalog_static.py
@@ -418,9 +418,10 @@ sync_plugin_provider_catalog()
def listed_canonical_providers() -> list[ProviderEntry]:
"""``CANONICAL_PROVIDERS`` minus pre-release profiles the user has not opted into: what a provider
LIST offers. Typed paths (``provider:model``, labels, ``--provider``) keep the full table."""
+ from hermes_cli import models # the binding every list consumer read before this filter existed
from providers import unlisted_provider_names
hidden = unlisted_provider_names()
- return [p for p in CANONICAL_PROVIDERS if p.slug not in hidden]
+ return [p for p in models.CANONICAL_PROVIDERS if p.slug not in hidden]
# ---------------------------------------------------------------------------
diff --git a/tests/hermes_cli/test_provider_parity.py b/tests/hermes_cli/test_provider_parity.py
index cace2c39409..149b84b489d 100644
--- a/tests/hermes_cli/test_provider_parity.py
+++ b/tests/hermes_cli/test_provider_parity.py
@@ -64,17 +64,23 @@ def _accounts_tab_providers() -> set[str]:
def test_every_hermes_model_provider_is_configurable_in_desktop():
- """PARITY CONTRACT: GUI (keys ∪ accounts) ⊇ `hermes model` universe."""
+ """PARITY CONTRACT: GUI (keys ∪ accounts) == the `hermes model` universe (listed providers):
+ every listed provider is configurable, and an unlisted pre-release one is on neither tab."""
+ from hermes_cli.models_catalog_static import listed_canonical_providers
+
gui = _keys_tab_providers() | _accounts_tab_providers()
+ listed = {e.slug for e in listed_canonical_providers()}
missing = [
- e.slug
- for e in CANONICAL_PROVIDERS
- if e.slug not in _EXEMPT and e.slug not in gui
+ slug
+ for slug in sorted(listed)
+ if slug not in _EXEMPT and slug not in gui
]
assert not missing, (
"providers shown in `hermes model` but not configurable in the desktop "
f"Providers tabs: {missing}"
)
+ leaked = sorted(gui & ({e.slug for e in CANONICAL_PROVIDERS} - listed))
+ assert not leaked, f"unlisted pre-release providers on the desktop Providers tabs: {leaked}"
def test_each_provider_lands_on_the_tab_its_auth_type_dictates():