diff --git a/run_agent.py b/run_agent.py index 47473eb51e..110c3137c4 100644 --- a/run_agent.py +++ b/run_agent.py @@ -1021,16 +1021,12 @@ class AIAgent: f"was found. Set the {_env_hint} environment " f"variable, or switch to a different provider with `hermes model`." ) - # Final fallback: try raw OpenRouter key - client_kwargs = { - "api_key": os.getenv("OPENROUTER_API_KEY", ""), - "base_url": OPENROUTER_BASE_URL, - "default_headers": { - "HTTP-Referer": "https://hermes-agent.nousresearch.com", - "X-OpenRouter-Title": "Hermes Agent", - "X-OpenRouter-Categories": "productivity,cli-agent", - }, - } + # No provider configured — reject with a clear message. + raise RuntimeError( + "No LLM provider configured. Run `hermes model` to " + "select a provider, or run `hermes setup` for first-time " + "configuration." + ) self._client_kwargs = client_kwargs # stored for rebuilding after interrupt