Skip to content

Model switcher ignores current provider — ambiguous name resolves to OpenRouter instead of active provider #19858

@nickthompson480

Description

@nickthompson480

Summary

When switching models by name (e.g., saying "sonnet" or "switch to sonnet"), Hermes resolves the name across all configured providers instead of preferring the currently active provider. This causes an unintended provider switch that silently breaks if the new provider has no API key.

Steps to reproduce

  1. Configure Hermes with provider: anthropic and a Claude OAuth token (CLAUDE_CODE_OAUTH_TOKEN) — no OpenRouter key set
  2. Ask Hermes to switch to "sonnet" (via chat or /model)
  3. Hermes resolves anthropic/claude-sonnet-4.6 from OpenRouter's catalog (note: dots in version = OpenRouter naming convention)
  4. Provider switches from anthropicOpenRouter
  5. Next request fails — no OPENROUTER_API_KEY in env

Expected behavior

The model switcher should prefer candidates from the current provider when resolving an ambiguous name. Only fall back to other providers if no match exists on the current one.

OpenRouter and Anthropic native use different naming conventions for the same models:

  • OpenRouter: anthropic/claude-sonnet-4.6 (dots)
  • Anthropic native: anthropic/claude-sonnet-4-6 (hyphens)

If I'm on provider: anthropic and say "sonnet", I expect to get anthropic/claude-sonnet-4-6 — not silently hop to OpenRouter.

Workaround

Edit ~/.hermes/config.yaml directly:

model: anthropic/claude-sonnet-4-6
provider: anthropic

Environment

  • Hermes v0.12.0
  • Provider: anthropic (Claude OAuth token)
  • Platform: macOS (tart VM)
  • Gateway: BlueBubbles

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/cliCLI entry point, hermes_cli/, setup wizardsweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions