From 8bf28e144146c3926f2d1148ebd8866d878aa434 Mon Sep 17 00:00:00 2001 From: PercyDikec Date: Sat, 7 Mar 2026 07:16:22 +0300 Subject: [PATCH] fix(setup): prevent OpenRouter model list fallback for Nous provider When `fetch_nous_models()` fails silently during setup, the model selection falls through to the OpenRouter static list. Users then pick models in OpenRouter format (e.g. `anthropic/claude-opus-4.6`) which the Nous inference API rejects with a 400 "missing model" error. Add an explicit `elif selected_provider == "nous"` branch that prompts for manual model entry instead of falling through to the generic OpenRouter fallback. --- hermes_cli/setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hermes_cli/setup.py b/hermes_cli/setup.py index 0aaecb42..7c8e3f44 100644 --- a/hermes_cli/setup.py +++ b/hermes_cli/setup.py @@ -1050,6 +1050,15 @@ def run_setup_wizard(args): config['model'] = custom save_env_value("LLM_MODEL", custom) # else: keep current + elif selected_provider == "nous": + # Nous login succeeded but model fetch failed — prompt manually + # instead of falling through to the OpenRouter static list. + print_warning("Could not fetch available models from Nous Portal.") + print_info("Enter a Nous model name manually (e.g., claude-opus-4-6).") + custom = prompt(f" Model name (Enter to keep '{current_model}')") + if custom: + config['model'] = custom + save_env_value("LLM_MODEL", custom) elif selected_provider == "openai-codex": from hermes_cli.codex_models import get_codex_model_ids # Try to get the access token for live model discovery