Bug Description
When switching to a user-defined provider (defined in config.yaml under providers:), both the interactive model picker and the direct --provider flag fail with:
Error: Unknown provider 'custom'. Check 'hermes model' for available providers, or define it in config.yaml under 'providers:'.
The provider appears correctly in the picker UI and shows its models, but selection fails.
Steps to Reproduce
- Define a custom provider in config.yaml:
providers:
custom:
name: My Custom Endpoint
api: https://my-endpoint.example.com/v1
api_key: sk-xxx
default_model: my-model
``
2. Run hermes gateway run
3. Send /model in Telegram/Discord
4. Pick the custom provider → pick a model
5. Observe: "Unknown provider 'custom'" error
### Expected Behavior
User-defined providers from providers: config should be resolvable both via the picker and via /model <name> --provider custom.
### Actual Behavior
Error: Unknown provider 'custom'. Check 'hermes model' for available providers, or define it in config.yaml under 'providers:'.
### Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
### Messaging Platform (if gateway-related)
Telegram
### Operating System
macOS 26.3.1
### Python Version
3.14.3
### Hermes Version
0.8
### Relevant Logs / Traceback
```shell
Root Cause Analysis (optional)
Set the model/provider directly in config.yaml under model: and restart the gateway.
Proposed Fix (optional)
Pass user_providers=user_provs to both _switch_model() calls in _handle_model_command():
- Line ~3606 (picker callback): add user_providers=user_provs
- Line ~3713 (direct command): add user_providers=user_provs
Are you willing to submit a PR for this?
Bug Description
When switching to a user-defined provider (defined in config.yaml under providers:), both the interactive model picker and the direct --provider flag fail with:
The provider appears correctly in the picker UI and shows its models, but selection fails.
Steps to Reproduce
Root Cause Analysis (optional)
Set the model/provider directly in config.yaml under model: and restart the gateway.
Proposed Fix (optional)
Pass user_providers=user_provs to both _switch_model() calls in _handle_model_command():
Are you willing to submit a PR for this?