# NousResearch/hermes-agent · Model routing prefers OpenRouter over direct providers

## Open now

- Nothing open on GitHub.

These issues and PRs concern a bug where the /model command silently routes requests through OpenRouter instead of using configured direct providers. Fixes and feature work address provider detection and profile provider usage during model switching.

## TL;DR

- 5 member(s): 0 open issue(s), 2 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #10780. Verify it addresses your case.
- **Recommended:** read PR #10780 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `partially_resolved` · deciding PR(s): `pr-10780`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.34`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #10300: /model silently routes to OpenRouter for direct providers (minimax-cn, zai, etc.)
- #14554: \[Bug\]: Multi Model for Profile don't work

## Prior & competing PRs

- **#10780: fix: stop /model from silently rerouting direct providers to OpenRouter**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `hermes_cli/models.py`
  - fix hunks:
  - `hermes_cli/models.py`

    ```diff
    @@ -1064,7 +1064,8 @@ def detect_provider_for_model(
                 break
     
         if direct_match:
    -        # Check if we have credentials for this provider
    +        # Check if we have credentials for this provider — env vars,
    +        # credential pool, or auth store entries.
             has_creds = False
             try:
                 from hermes_cli.auth import PROVIDER_REGISTRY
    ```

    ```diff
    @@ -1077,16 +1078,28 @@ def detect_provider_for_model(
                             break
             except Exception:
                 pass
    -
    -        if has_creds:
    -            return (direct_match, name)
    -
    -        # No direct creds — try to find this model on OpenRouter instead
    -        or_slug = _find_openrouter_slug(name)
    -        if or_slug:
    -            return ("openrouter", or_slug)
    -        # Still return the direct provider — credential resolution will
    -        # give a clear error rather than silently using the wrong provider
    +        # Also check credential pool and auth store — covers OAuth,
    +        # Claude Code tokens, and other non-env-var credentials (#10300).
    +        if not has_creds:
    +            try:
    +                from agent.credential_pool import load_pool
    +                pool = load_pool(direct_match)
    +                if pool.has_credentials():
    +                    has_creds = True
    +            except Exception:
    +                pass
    +        if not has_creds:
    +            try:
    +                from hermes_cli.auth import _load_auth_store
    +                store = _load_auth_store()
    +                if direct_match in store.get("providers", {}) or direct_match in store.get("credential_pool", {}):
    +                    has_creds = True
    +            except Exception:
    +                pass
    +
    +        # Always return the direct provider match.  If credentials are
    +        # missing, the client init will give a clear error rather than
    +        # silently routing through the wrong provider (#10300).
             return (direct_match, name)
     
         # --- Step 2: check OpenRouter catalog ---
    ```
- **#10466: fix(model): prefer direct providers over OpenRouter fallback**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `#10780`
- **#14584: fix(cli): use profile providers during model switch**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`

## Fix status

- Merged to main in PR #10780 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-04-16`. This confirmation is old and may be out of date (a revert/reopen would not have invalidated it here); re-verify.
