From 4cc431afabe85fede0b375d3981048bc04e87080 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Mon, 2 Mar 2026 22:20:45 -0800 Subject: [PATCH] fix: setup wizard skipping provider selection on fresh install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The is_existing check included 'get_config_path().exists()' which is always True after installation (the installer copies config.yaml from the template). This caused the wizard to enter quick mode, which skips provider selection entirely — leaving hermes non-functional. Fix: only consider it an existing installation when an actual inference provider is configured (OPENROUTER_API_KEY, OPENAI_BASE_URL, or an active OAuth provider). Fresh installs now correctly show the full setup flow with provider selection. --- hermes_cli/setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hermes_cli/setup.py b/hermes_cli/setup.py index b49285930..0bc9acc0a 100644 --- a/hermes_cli/setup.py +++ b/hermes_cli/setup.py @@ -390,11 +390,17 @@ def run_setup_wizard(args): config = load_config() hermes_home = get_hermes_home() - # Check if this is an existing installation with config (any provider or config file) + # Check if this is an existing installation with a provider configured. + # Just having config.yaml is NOT enough — the installer creates it from + # a template, so it always exists after install. We need an actual + # inference provider to consider it "existing" (otherwise quick mode + # would skip provider selection, leaving hermes non-functional). + from hermes_cli.auth import get_active_provider + active_provider = get_active_provider() is_existing = ( get_env_value("OPENROUTER_API_KEY") is not None or get_env_value("OPENAI_BASE_URL") is not None - or get_config_path().exists() + or active_provider is not None ) # Import migration helpers