diff --git a/acp_adapter/server.py b/acp_adapter/server.py index f864d42a2c..717f7562b9 100644 --- a/acp_adapter/server.py +++ b/acp_adapter/server.py @@ -886,7 +886,7 @@ class HermesACPAgent(acp.Agent): if normalized == "custom": return any( candidate == raw - or candidate == f"custom:{raw}" + or f"custom:{candidate}" == raw or (raw == "custom" and candidate == "custom") for candidate in named_empty_authoritative ) diff --git a/hermes_cli/model_setup_flows.py b/hermes_cli/model_setup_flows.py index fb0fbc3a38..aec87f3440 100644 --- a/hermes_cli/model_setup_flows.py +++ b/hermes_cli/model_setup_flows.py @@ -1553,7 +1553,11 @@ def _model_flow_named_custom(config, provider_info): configured_models = [ str(m) for m in cfg_models - if m != "__explicit_model_allowlist__" and str(m).strip() + if m not in { + "__explicit_model_allowlist__", + "__discovered_model_catalog__", + } + and str(m).strip() ] elif isinstance(cfg_models, list): configured_models = [] diff --git a/hermes_cli/model_switch.py b/hermes_cli/model_switch.py index e8835a8c10..6e8d11ad4e 100644 --- a/hermes_cli/model_switch.py +++ b/hermes_cli/model_switch.py @@ -3381,7 +3381,7 @@ def list_authenticated_providers( has_explicit_models, headers=_extra_headers_from_config(ep_cfg) or None, timeout=(1.5 if for_picker else 5.0), - api_mode=grp.get("api_mode"), + api_mode=ep_cfg.get("api_mode"), ) if isinstance(live_models, _NativePickerModelList): native_catalog_empty = not live_models @@ -3403,7 +3403,7 @@ def list_authenticated_providers( cache_only=True, timeout=(1.5 if for_picker else 5.0), headers=_extra_headers_from_config(ep_cfg) or None, - api_mode=grp.get("api_mode"), + api_mode=ep_cfg.get("api_mode"), ) if cached_models: models_list = cached_models