Skip to content

Model picker only shows one model for custom providers #20582

@chmichae1

Description

@chmichae1

Bug Report: /model command only shows one model for custom providers

Environment:

  • Hermes Agent version: v0.12.0 (2026.4.30)
  • Python: 3.11.15
  • Platform: CLI and Telegram gateway

Configuration:

model:
  default: custom-model-1
  provider: custom
  base_url: http://localhost:8000/v1

custom_providers:
- name: MyCustomProvider
  base_url: http://localhost:8000/v1
  model: custom-model-1

Issue:
When running /model command (both in CLI and Telegram), the interactive model picker only displays one model despite the custom provider endpoint returning multiple available models via the /v1/models API.

Expected behavior:
The /model command should fetch and display all available models from the custom provider's /v1/models endpoint, similar to how it works with OpenRouter and other providers.

Actual behavior:
Only one model is shown in the model picker interface.

Verification:
The endpoint correctly returns multiple models in OpenAI-compatible format:

$ curl -s http://localhost:8000/v1/models
{
  "object": "list",
  "data": [
    {"id": "custom-model-1", "object": "model", "created": 1778046005, "owned_by": "custom"},
    {"id": "custom-model-2", "object": "model", "created": 1778046005, "owned_by": "custom"},
    {"id": "custom-model-3", "object": "model", "created": 1778046005, "owned_by": "custom"},
    {"id": "custom-model-4", "object": "model", "created": 1778046005, "owned_by": "custom"},
    {"id": "custom-model-5", "object": "model", "created": 1778046005, "owned_by": "custom"},
    {"id": "custom-model-6", "object": "model", "created": 1778046005, "owned_by": "custom"}
  ]
}

Workaround:
Models can be switched using the CLI command:

hermes config set model.default "custom-model-2"

Root cause hypothesis:
The interactive model picker (hermes model command) may not be properly querying the /v1/models endpoint for custom providers, or it's only reading the single model field from the custom_providers config instead of fetching the full list dynamically.

Suggested fix:
The model picker should:

  1. Detect when the current provider is a custom provider
  2. Query the base_url + /v1/models endpoint
  3. Parse the response and display all available models
  4. Fall back to the configured model field only if the API call fails

Impact:
Users with custom provider endpoints (like local LLM routers, vLLM servers, or other OpenAI-compatible APIs) cannot easily switch between available models through the interactive UI and must use the CLI workaround.

Reproduction:
This affects any custom provider setup where the /v1/models endpoint returns multiple models but only one is configured in the custom_providers.model field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/cliCLI entry point, hermes_cli/, setup wizardtype/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