Skip to content

fix(models): use curated list for Nous in provider_model_ids() - #10243

Closed
teknium1 wants to merge 1 commit into
mainfrom
hermes/hermes-5d6c3d3e
Closed

fix(models): use curated list for Nous in provider_model_ids()#10243
teknium1 wants to merge 1 commit into
mainfrom
hermes/hermes-5d6c3d3e

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

provider_model_ids('nous') was calling fetch_nous_models() which hits the live Nous Portal /models endpoint and returns the full API catalog — 382 models including image generators, rerankers, embedding models, and other non-agentic models.

This caused the /model picker's fallback (when the curated list was unavailable due to stale .pyc caches on WSL2) to dump hundreds of models into the picker, making it scroll off-screen and unusable.

Root cause: PR #10146 fixed the /model picker to prefer the curated list first. But the fallback still called provider_model_ids(), which for Nous returned 382 live models. On WSL2 where .pyc timestamp mismatches prevented the #10146 fix from being compiled, users saw the full catalog.

Fix

Return the curated _PROVIDER_MODELS['nous'] list (29 models) directly, matching:

  • hermes model (uses _PROVIDER_MODELS)
  • Gateway /model picker (uses list_authenticated_providers() → curated)
  • OpenRouter flow (uses fetch_openrouter_models() → curated cross-ref)
Call Before After
provider_model_ids('nous') 382 (live API) 29 (curated)
provider_model_ids('openrouter') 30 (curated) 30 (curated)
provider_model_ids('anthropic') 7 (live) 7 (live)

Test plan

  • 63 model validation tests pass
  • 2057 hermes_cli tests pass (9 pre-existing failures in env_loader/gateway_service)
  • py_compile verified
  • E2E: provider_model_ids('nous') confirmed returning 29 models

provider_model_ids('nous') was calling fetch_nous_models() which
returns the FULL live Nous API catalog (382 models including image
generators, rerankers, and non-agentic models). This caused the
/model picker fallback to dump hundreds of models into the list,
making it unusable.

PR #10146 fixed the /model picker to prefer the curated list first,
but the fallback still called provider_model_ids() which returned
382 models. On WSL2 environments where stale .pyc caches prevented
the #10146 fix from taking effect, users saw the full catalog.

Fix: Return the curated _PROVIDER_MODELS['nous'] list (29 models)
directly, matching the pattern used by hermes model, the gateway
picker, and the OpenRouter flow (which also uses curated lists
cross-referenced against the live API rather than raw live data).

Before: provider_model_ids('nous') → 382 models (live API)
After:  provider_model_ids('nous') → 29 models (curated)
@teknium1

Copy link
Copy Markdown
Contributor Author

Superseded by #12671. Root cause was in tui_gateway/server.py's model.options handler overwriting the curated list with provider_model_ids() — not in provider_model_ids() itself. Classic CLI /model and hermes model were already using the curated list correctly; only TUI was affected. #12671 fixes it at the overwrite site so the live catalog path remains available for any caller that genuinely wants it.

@teknium1 teknium1 closed this Apr 19, 2026
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.

1 participant