Skip to content

Canonicalize OpenRouter model catalog discovery - #9474

Closed
g-guthrie wants to merge 8 commits into
NousResearch:mainfrom
g-guthrie:codex/openrouter-canonical-catalog
Closed

Canonicalize OpenRouter model catalog discovery#9474
g-guthrie wants to merge 8 commits into
NousResearch:mainfrom
g-guthrie:codex/openrouter-canonical-catalog

Conversation

@g-guthrie

@g-guthrie g-guthrie commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR removes the hand-coded OpenRouter model snapshot from Hermes and makes the OpenRouter picker/model catalog derive only from OpenRouter's live /v1/models API.

What changed

  • removed the static OPENROUTER_MODELS snapshot from hermes_cli/models.py
  • made fetch_openrouter_models() build the catalog directly from OpenRouter's live /v1/models response
  • removed the models.dev fallback so OpenRouter model discovery has a single source of truth
  • updated list_authenticated_providers() to use the dynamic OpenRouter picker catalog instead of a baked-in list
  • added regression tests to ensure /model consumes the discovered OpenRouter catalog

Why

The goal here is specifically to stop requiring manual source updates whenever OpenRouter adds or changes models. OpenRouter models should come from OpenRouter itself, not from a hand-maintained Hermes list or a secondary fallback source.

Testing

Ran:

  • /Users/gguthrie/Desktop/Hermes-Agent/venv/bin/python3.11 -m pytest -o addopts='' tests/hermes_cli/test_models.py tests/hermes_cli/test_model_switch_custom_providers.py tests/hermes_cli/test_model_validation.py tests/hermes_cli/test_opencode_go_in_model_list.py -q

Result:

  • 113 passed

Supersedes

@g-guthrie
g-guthrie marked this pull request as ready for review April 14, 2026 08:23
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard provider/openrouter OpenRouter aggregator labels Apr 27, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing as superseded by #16033.

Triage notes (medium confidence):
PR #16033 (merged) introduced a remote model catalog manifest (get_curated_openrouter_models) consumed by fetch_openrouter_models in hermes_cli/models.py:1134, removing the manual-snapshot maintenance burden this PR targets while keeping OPENROUTER_MODELS only as a deep fallback.

Thanks for the contribution — the underlying problem this PR addresses has been resolved by the linked PR on current main. If you believe this was closed in error, please comment and we'll reopen.

(Bulk-closed during a CLI PR triage sweep.)

@teknium1 teknium1 closed this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/openrouter OpenRouter aggregator type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants