Skip to content

feat(model-picker): add picker_providers config to filter which providers appear in /model #12655

@Agent-Smith-AI

Description

@Agent-Smith-AI

Feature Description

Add a picker_providers config option under the model: key to control which providers appear in the /model picker output. This allows users who exclusively use custom endpoints to hide built-in provider entries (Anthropic, OpenRouter, etc.) that auto-detect via OAuth/env credentials.

Motivation

Our setup uses a single custom provider (AgentOne) with 23 models. The picker also shows Anthropic (8 models) because Claude Code OAuth credentials exist on disk (~/.claude/.credentials.json). This is confusing — we never use Anthropic through Hermes.

Current picker output:

custom:agentone    models=23  source=user-config
anthropic          models= 8  source=hermes

There is no way to hide the Anthropic entry. The only workaround would be deleting the Claude Code credentials file, which breaks Claude Code itself.

Proposed Solution

Add a picker_providers list to config.yaml:

model:
  default: glm-5-zai
  provider: custom
  picker_providers:
    - custom        # only show custom providers

Behavior

picker_providers value Effect
Not set / null Show all providers (current behavior, backward compatible)
["custom"] Only show custom_providers entries
["anthropic", "custom"] Only show Anthropic + custom entries
[] Show none (edge case, treated as not set)

Implementation

In hermes_cli/model_switch.py, function list_authenticated_providers():

  1. Read picker_providers from config (passed through or read from config)
  2. After building the full results list, before the final sort (around line 1145), filter results:
    if picker_providers:
        allowed = {p.lower() for p in picker_providers}
        results = [r for r in results if r["slug"].lower() in allowed]
  3. The filter matches against provider slug (custom:agentone becomes custom, anthropic, etc.)

Files to modify

  • hermes_cli/model_switch.py — add filter in list_authenticated_providers(), accept picker_providers param
  • hermes_cli/config.py — add picker_providers to default config schema (default: null)
  • Callers of list_authenticated_providers() — pass the new param from config

Size estimate

~15-20 lines of functional code + config schema entry. No new dependencies.

Alternatives Considered

  1. hide_builtin_providers: true — simpler but less flexible (binary toggle)
  2. Credential-based suppression — skip providers whose creds come from external OAuth files rather than explicit config. Too magical and fragile.
  3. Upstream contribution — searched upstream issues + PRs, no existing request for provider filtering in the picker. Related but different: PR fix(model-picker): hide providers with no curated LLM models #7267 hides providers with 0 models.

Search Confirmation

Searched this repo:

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/configConfig system, migrations, profilescomp/cliCLI entry point, hermes_cli/, setup wizardtype/featureNew feature or request

    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