Skip to content

fix(setup): prevent OpenRouter model list fallback for Nous provider#575

Merged
teknium1 merged 1 commit into
NousResearch:mainfrom
PercyDikec:fix/setup-nous-model-fallback
Mar 8, 2026
Merged

fix(setup): prevent OpenRouter model list fallback for Nous provider#575
teknium1 merged 1 commit into
NousResearch:mainfrom
PercyDikec:fix/setup-nous-model-fallback

Conversation

@PercyDikec

Copy link
Copy Markdown
Contributor

What does this PR do?

When fetch_nous_models() fails silently during hermes setup, the model selection falls through to the OpenRouter static list. Users pick a model in OpenRouter format (e.g., anthropic/claude-opus-4.6), but the Nous inference API expects bare model IDs (e.g., claude-opus-4-6) and rejects the request with a 400 missing model error.

This PR adds an explicit elif selected_provider == "nous" branch that catches the case when Nous is selected but the model list is empty. Instead of falling through to the OpenRouter list, it warns the user and prompts for manual model entry with a Nous-format example.

Related Issue

Fixes #574

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/setup.py: Added elif selected_provider == "nous" branch between the successful Nous model list case and the Codex case. When Nous model fetch fails, warns the user and prompts for manual model name entry instead of falling through to the OpenRouter static list.

How to Test

  1. Run hermes setup, select Nous Portal, complete login
  2. If model fetch succeeds: existing behavior unchanged (dynamic model list shown)
  3. If model fetch fails (simulate by temporarily blocking inference-api.nousresearch.com):
    • Before fix: OpenRouter model list shown → wrong format saved → 400 error
    • After fix: Warning shown → manual entry prompted with correct format example

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix
  • I've tested on my platform: Ubuntu 24.04 (WSL2)

Documentation & Housekeeping

  • N/A (small fix, no docs/config/schema changes)

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.
@teknium1 teknium1 merged commit 4267355 into NousResearch:main Mar 8, 2026
1 check passed
@teknium1

teknium1 commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

Merged in 4267355 — thanks for the clean fix and the detailed issue writeup @PercyDikec!

angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…fallback for Nous provider

Authored by PercyDikec. Fixes NousResearch#574.

# Conflicts:
#	hermes_cli/setup.py
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…fallback for Nous provider

Authored by PercyDikec. Fixes NousResearch#574.

# Conflicts:
#	hermes_cli/setup.py
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…fallback for Nous provider

Authored by PercyDikec. Fixes NousResearch#574.

# Conflicts:
#	hermes_cli/setup.py
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…fallback for Nous provider

Authored by PercyDikec. Fixes NousResearch#574.

# Conflicts:
#	hermes_cli/setup.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Setup wizard shows OpenRouter model list when Nous Portal model fetch fails, causing 400 missing model errors

2 participants