From aa389924ad1bb0076b203b41fc15dc423abdee5c Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 29 Mar 2026 20:55:15 -0700 Subject: [PATCH] fix: prefer curated model list when live probe returns fewer models (#3856) The model picker for API-key providers (MiniMax, z.ai, etc.) probes the live /models endpoint when the curated list has fewer than 8 models. When the live endpoint returns fewer models than the curated list (e.g. MiniMax's Anthropic-compatible endpoint doesn't list M2.7), the incomplete live list was used instead. Now falls back to the curated list when live returns fewer models, ensuring new models like MiniMax-M2.7 always appear in the picker. --- hermes_cli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_cli/main.py b/hermes_cli/main.py index 4c5f8f320..cf445d845 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -2125,7 +2125,7 @@ def _model_flow_api_key_provider(config, provider_id, current_model=""): api_key_for_probe = existing_key or (get_env_value(key_env) if key_env else "") live_models = fetch_api_models(api_key_for_probe, effective_base) - if live_models: + if live_models and len(live_models) >= len(curated): model_list = live_models print(f" Found {len(model_list)} model(s) from {pconfig.name} API") else: