From 72ffcb978862feadb673df0c3efbb4018ee969b5 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 28 Oct 2026 07:59:30 -0700 Subject: [PATCH] fix(providers): look up an alias owner only when a loaded profile claims the alias The home-aware owner lookup ran for every non-static canonical id, so a registry stub (and any profile object without aliases) reached `owner.aliases`. Ask the listed profiles first: an id no profile names as an alias keeps what normalize_provider gave it, without calling get_provider_profile at all. --- hermes_cli/providers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hermes_cli/providers.py b/hermes_cli/providers.py index 0c323e36f7..80b49b3d22 100644 --- a/hermes_cli/providers.py +++ b/hermes_cli/providers.py @@ -269,7 +269,9 @@ def _plugin_alias_owner(canonical: str) -> str: if not canonical or _is_static_canonical(canonical): return canonical from providers import get_provider_profile, list_providers - if any(prof.name == canonical for prof in list_providers()): + profiles = list_providers() + if any(prof.name == canonical for prof in profiles) or not any( + canonical in prof.aliases for prof in profiles): return canonical owner = get_provider_profile(canonical) if owner is None or canonical not in owner.aliases or owner.provider_overlay: