fix(models): complete selector parity safeguards
Co-authored-by: Taneli Mielikäinen <taneli.mielikainen@iki.fi>
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user