Skip to content

[Bug]: /model for custom: provider that has 2 or more models gives out an error #18319

@jkyamog

Description

@jkyamog

Bug Description

If I have 2 models on a custom provider like:

- name: local
  base_url: http://127.0.0.1:8080/v1
  key_env: DUMMY_API_KEY
  model: qwen-3.5
  models:
    qwen-3.5:
    minimax-2.7:

After picking the on /model I get an error of ✗ Model 'minimax-2.7' was not found in this provider's model listing.

Steps to Reproduce

  1. Configure hermes with 2 or more custom models in a custom provider
  2. Run hermes
  3. pick a model by /model
  4. After selecting a model I get the error.

Expected Behavior

It would switch to the new model I have selected.

Actual Behavior

an error of ✗ Model '[MODEL_SELECTED]' was not found in this provider's model listing.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

--- hermes dump ---
version:          0.12.0 (2026.4.30) [9755828a]
os:               Linux 6.17.13-2-pve x86_64
python:           3.11.15
openai_sdk:       2.32.0
profile:          default
hermes_home:      ~/.hermes
model:            gpt-5.4
provider:         custom
terminal:         local

api_keys:
  openrouter           not set
  openai               not set
  anthropic            not set
  anthropic_token      not set
  nous                 not set
  google/gemini        not set
  gemini               not set
  glm/zai              not set
  zai                  not set
  kimi                 not set
  minimax              not set
  deepseek             not set
  dashscope            not set
  huggingface          not set
  nvidia               not set
  ai_gateway           not set
  opencode_zen         not set
  opencode_go          not set
  kilocode             not set
  firecrawl            not set
  tavily               not set
  browserbase          not set
  fal                  not set
  elevenlabs           not set
  github               not set

features:
  toolsets:           hermes-cli
  mcp_servers:        0
  memory_provider:    built-in
  gateway:            stopped (systemd (user))
  platforms:          none
  cron_jobs:          0
  skills:             115

config_overrides:
  agent.max_turns: 60
  compression.threshold: 0.95
  display.streaming: True
--- end dump ---

Operating System

Ubuntu 24.04

Python Version

Python 3.12.3

Hermes Version

v0.12.0 (2026.4.30)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

The bug is on hermes_cli/models.py line 3089 doesn't take into account "custom:XXX" provider. It only testing for normalized "custom" string.

Proposed Fix (optional)

Both "custom" and "custom:XXX" should be treated as a custom provider.

def is_custom_provider(provider: Optional[str]) -> bool:
    """Return True for generic and named custom providers."""
    normalized = normalize_provider(provider)
    return normalized == "custom" or normalized.startswith("custom:")

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/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