Skip to content

The agent that grows with you

fix(picker): providers.<overlay>.models extends Hermes-overlay rows (azure-foundry)

Jesse Panganibandd00b6c35129
diff --git a/contributors/emails/[email protected] b/contributors/emails/[email protected]
new file mode 100644
index 00000000000..a9ab687706f
--- /dev/null
+++ b/contributors/emails/[email protected]
@@ -0,0 +1 @@
+thejpanganiban
diff --git a/hermes_cli/model_switch_providers.py b/hermes_cli/model_switch_providers.py
index a039213542e..152b60c205b 100644
--- a/hermes_cli/model_switch_providers.py
+++ b/hermes_cli/model_switch_providers.py
@@ -860,9 +860,10 @@ def _overlay_has_creds(b: _PickerBuild, pid: str, hermes_slug: str, overlay) ->
return has_creds
-def _lap_overlay_rows(b: _PickerBuild, data: dict) -> None:
+def _lap_overlay_rows(b: _PickerBuild, data: dict, user_providers: dict) -> None:
"""Section 2: Hermes-only providers (nous, openai-codex, copilot, opencode-go, ...)."""
from agent.models_dev import PROVIDER_TO_MODELS_DEV
+ from hermes_cli.model_switch import _declared_model_ids
from hermes_cli.providers import HERMES_OVERLAYS
# HERMES_OVERLAYS keys may be models.dev IDs ("github-copilot") while config.yaml uses
@@ -891,6 +892,11 @@ def _lap_overlay_rows(b: _PickerBuild, data: dict) -> None:
else:
model_ids = _live_or_curated_ids(hermes_slug, b.curated, hermes_slug, pid,
non_blocking=b.non_blocking_catalogs)
+ # A providers.<overlay>.models block extends the row exactly as it does for built-in rows
+ # (section 1); section 3 never emits it because this row owns the slug (#27989).
+ configured = user_providers.get(hermes_slug) or user_providers.get(pid) if isinstance(user_providers, dict) else None
+ if isinstance(configured, dict):
+ model_ids = list(dict.fromkeys([*_declared_model_ids(configured.get("models")), *model_ids]))
b.add_builtin_row(
hermes_slug, get_label(hermes_slug), b.current_provider in (hermes_slug, pid), model_ids, "hermes")
b.seen_slugs.add(pid.lower())
@@ -1203,7 +1209,7 @@ def list_authenticated_providers(
_lap_lmstudio_row(b, user_providers if isinstance(user_providers, dict) else {})
_lap_builtin_rows(b, data, user_providers)
- _lap_overlay_rows(b, data)
+ _lap_overlay_rows(b, data, user_providers)
_lap_canonical_rows(b)
if user_providers and isinstance(user_providers, dict):
_lap_user_provider_rows(b, user_providers)