Skip to content

fix(models): add Claude Sonnet 5 to curated model lists - #55853

Closed
liuhao1024 wants to merge 6 commits into
NousResearch:mainfrom
liuhao1024:liuhao/cron-bugfix-55846-claude-sonnet-5
Closed

fix(models): add Claude Sonnet 5 to curated model lists#55853
liuhao1024 wants to merge 6 commits into
NousResearch:mainfrom
liuhao1024:liuhao/cron-bugfix-55846-claude-sonnet-5

Conversation

@liuhao1024

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds Claude Sonnet 5 (claude-sonnet-5) to the static curated model lists in hermes_cli/models.py so it appears in hermes model / /model picker discovery for Anthropic, OpenRouter, Nous Portal, GitHub Copilot, GMI, OpenCode Zen, and AWS Bedrock.

Related Issue

Fixes #55846

Type of Change

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

Changes Made

  • hermes_cli/models.py: Added claude-sonnet-5 / anthropic/claude-sonnet-5 to 7 curated lists:
    • OPENROUTER_MODELS (fallback snapshot)
    • _PROVIDER_MODELS["nous"] (Nous Portal)
    • _PROVIDER_MODELS["copilot"] (GitHub Copilot)
    • _PROVIDER_MODELS["anthropic"] (native Anthropic)
    • _PROVIDER_MODELS["gmi"] (GMI cloud)
    • _PROVIDER_MODELS["opencode-zen"] (OpenCode Zen)
    • _PROVIDER_MODELS["bedrock"] (AWS Bedrock)
  • tests/hermes_cli/test_models.py: Added 3 regression tests verifying Sonnet 5 appears in the anthropic, OpenRouter, and nous curated lists.
  • website/static/api/model-catalog.json: Regenerated via scripts/build_model_catalog.py.

How to Test

  1. python -m pytest tests/hermes_cli/test_models.py::TestClaudeSonnet5InCuratedLists -q — should pass (3 tests)
  2. python -m pytest tests/hermes_cli/test_models.py -q — all 90 tests should pass
  3. python -m pytest tests/hermes_cli/test_model_catalog.py -q — all 29 tests should pass
  4. Verify claude-sonnet-5 appears in hermes model picker for Anthropic provider

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 26.4.1

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Add claude-sonnet-5 to the static curated lists for Anthropic, OpenRouter,
Nous Portal, Copilot, GMI, OpenCode Zen, and AWS Bedrock so the model
appears in hermes model / /model picker discovery.

Fixes NousResearch#55846
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard provider/anthropic Anthropic native Messages API P3 Low — cosmetic, nice to have labels Jun 30, 2026
The test test_provider_model_ids_falls_back_to_static_models asserts
provider_model_ids('gmi') == list(_PROVIDER_MODELS['gmi']), but when
live API is unavailable the function returns fallback_models from the
provider profile instead of _PROVIDER_MODELS. Add claude-sonnet-5 to
the GMI plugin's fallback_models to match the curated list update.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catalog update. Current main already includes the OpenRouter/Nous part through 76a468e51315e7e822990257b284dc8ee938ff38 (hermes_cli/models.py:45 and :196), while the native Anthropic setup flow still uses the static list at hermes_cli/model_setup_flows.py:2950, where current _PROVIDER_MODELS["anthropic"] omits Sonnet 5 (hermes_cli/models.py:368-379).

Problems

  • tests/hermes_cli/test_models.py:979, :984, and :988 freeze individual catalog contents. AGENTS.md:1309-1355 explicitly rejects model-catalog change-detector tests; these will fail on normal model replacement without testing a behavior contract.
  • The change updates GMI in both _PROVIDER_MODELS and ProviderProfile.fallback_models, but the new tests do not guard that duplicated fallback relationship.

Suggested changes

  • Replace the exact Sonnet-5 assertions with an invariant. The existing manifest drift guard in tests/hermes_cli/test_model_catalog.py:514-543 already covers the OpenRouter/Nous generated-catalog relationship.
  • If salvaging GMI, add a relation test that its profile fallback remains aligned with _PROVIDER_MODELS["gmi"].

Automated hermes-sweeper review.


def test_anthropic_native_list_includes_sonnet_5(self):
from hermes_cli.models import _PROVIDER_MODELS
assert "claude-sonnet-5" in _PROVIDER_MODELS["anthropic"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this model-specific membership snapshot (and the sibling Sonnet-5 assertions below). AGENTS.md:1309-1355 rejects change-detector tests for model catalogs; prefer an invariant such as the existing generated-manifest drift guard or a provider-fallback consistency relation.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
teknium1 added a commit that referenced this pull request Jul 20, 2026
The salvaged #55853 commit added anthropic/claude-sonnet-5 blocks to the
manifest, but main already carried them from #56617 — leaving duplicate
entries the manifest-sync test rejects. Rebuilt via
scripts/build_model_catalog.py.
teknium1 added a commit that referenced this pull request Jul 20, 2026
PRs #55848 and #55853 both added claude-sonnet-5 to the anthropic and
gmi curated lists; keep one entry each (newest-sonnet-first ordering
under claude-fable-5, matching the existing list convention).
teknium1 added a commit that referenced this pull request Jul 20, 2026
The salvaged #55853 commit added anthropic/claude-sonnet-5 blocks to the
manifest, but main already carried them from #56617 — leaving duplicate
entries the manifest-sync test rejects. Rebuilt via
scripts/build_model_catalog.py.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #67932 — both of your commits (curated-list coverage + the GMI plugin fallback_models fix) were cherry-picked onto current main with your authorship preserved (rebase merge). Your regression tests for the curated lists landed too. Thanks!

#67932

randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
PRs NousResearch#55848 and NousResearch#55853 both added claude-sonnet-5 to the anthropic and
gmi curated lists; keep one entry each (newest-sonnet-first ordering
under claude-fable-5, matching the existing list convention).
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
The salvaged NousResearch#55853 commit added anthropic/claude-sonnet-5 blocks to the
manifest, but main already carried them from NousResearch#56617 — leaving duplicate
entries the manifest-sync test rejects. Rebuilt via
scripts/build_model_catalog.py.
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/anthropic Anthropic native Messages API sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model picker/catalog omits Claude Sonnet 5 despite Anthropic availability

3 participants