Bug Description
When Hermes is configured with a custom OpenAI-compatible provider using the newer providers.<name> shape (base_url, model, and models as a dict), the Telegram /model picker does not show the full model list for that provider.
In our case, the picker only surfaced the default model and could also show duplicate provider entries such as custom (0) and custom (1) instead of a single provider with the full model list.
Steps to Reproduce
- Configure a custom provider in
~/.hermes/config.yaml using the newer shape:
providers:
custom:
base_url: http://example.com/v1
model: gpt-5.4
models:
gpt-5.4: {}
grok-4.20-beta: {}
minimax-m2.7: {}
- Start the Telegram gateway.
- Open the
/model picker.
- Inspect the provider list and the models shown for
custom.
Expected Behavior
- The picker should show a single
custom provider entry.
- The picker should list all models defined in
providers.custom.models.
- The default
model should be included, but not duplicated.
Actual Behavior
- The picker only showed the default model from
model.
- In some cases it also showed duplicate provider entries such as
custom (0) and custom (1).
Affected Component
- Gateway (Telegram)
- Configuration (
config.yaml, custom providers)
- CLI/model switch shared provider listing logic
Operating System
Debian 13 (trixie)
Python Version
3.11.x
Hermes Version
Current main as of 2026-04-17
Root Cause Analysis
list_authenticated_providers() in hermes_cli/model_switch.py handled older custom-provider shapes (default_model, list-style models) but did not fully support the newer config shape that uses:
base_url
model
models as a dict keyed by model name
There was also no deduplication between the direct providers.custom view and the compatibility-layer custom_providers view, which could surface duplicate provider rows.
Proposed Fix
Update list_authenticated_providers() to:
- accept
base_url as the provider API URL source,
- accept
model as the default model source,
- expand
models when it is a dict by using its keys as model names,
- deduplicate provider slugs so the same provider is not shown twice.
I already have a local patch and regression tests for this and can open a PR linked to this issue.
Bug Description
When Hermes is configured with a custom OpenAI-compatible provider using the newer
providers.<name>shape (base_url,model, andmodelsas a dict), the Telegram/modelpicker does not show the full model list for that provider.In our case, the picker only surfaced the default model and could also show duplicate provider entries such as
custom (0)andcustom (1)instead of a single provider with the full model list.Steps to Reproduce
~/.hermes/config.yamlusing the newer shape:/modelpicker.custom.Expected Behavior
customprovider entry.providers.custom.models.modelshould be included, but not duplicated.Actual Behavior
model.custom (0)andcustom (1).Affected Component
config.yaml, custom providers)Operating System
Debian 13 (trixie)
Python Version
3.11.x
Hermes Version
Current
mainas of 2026-04-17Root Cause Analysis
list_authenticated_providers()inhermes_cli/model_switch.pyhandled older custom-provider shapes (default_model, list-stylemodels) but did not fully support the newer config shape that uses:base_urlmodelmodelsas a dict keyed by model nameThere was also no deduplication between the direct
providers.customview and the compatibility-layercustom_providersview, which could surface duplicate provider rows.Proposed Fix
Update
list_authenticated_providers()to:base_urlas the provider API URL source,modelas the default model source,modelswhen it is a dict by using its keys as model names,I already have a local patch and regression tests for this and can open a PR linked to this issue.