Summary
On Telegram/Discord, running /model with no args is documented to show an interactive inline-keyboard picker, but it silently falls back to the text list instead. The picker code path raises a TypeError that's swallowed by a bare except Exception: providers = [].
Reproduction
- Telegram (or Discord) bot on
hermes-agent v0.12.0
- In any chat, send
/model with no arguments
- Expected: inline-keyboard provider/model picker
- Actual: plain text list of providers + "
/model <name> — switch model" usage hint
Root cause
In gateway/run.py _handle_model_command calls:
providers = list_picker_providers(
current_provider=current_provider,
current_base_url=current_base_url,
current_model=current_model,
user_providers=user_provs,
custom_providers=custom_provs,
max_models=50,
)
But hermes_cli/model_switch.py:list_picker_providers does not accept current_base_url or current_model:
def list_picker_providers(
current_provider: str = "",
user_providers: dict = None,
custom_providers: list | None = None,
max_models: int = 8,
) -> List[dict]:
The call raises TypeError: list_picker_providers() got an unexpected keyword argument 'current_base_url'. That exception is caught by:
try:
providers = list_picker_providers(...)
except Exception:
providers = []
Empty providers then fails the if providers: guard and execution falls through to the text-list fallback. No log, no error to the user, picker just never appears.
Suggested fix
- Add the missing kwargs to
list_picker_providers and forward them to the inner list_authenticated_providers call:
def list_picker_providers(
current_provider: str = "",
current_base_url: str = "",
current_model: str = "",
user_providers: dict = None,
custom_providers: list | None = None,
max_models: int = 8,
) -> List[dict]:
...
providers = list_authenticated_providers(
current_provider=current_provider,
current_base_url=current_base_url,
current_model=current_model,
user_providers=user_providers,
custom_providers=custom_providers,
max_models=max_models,
)
- Replace the bare
except Exception: providers = [] in _handle_model_command with at least a logger.warning("list_picker_providers raised: %s", exc, exc_info=True) so future signature drift surfaces in logs.
Verified locally
Patched both files on a v0.12.0 install and the inline-keyboard picker appears as expected on Telegram. Happy to open a PR if useful.
Environment
hermes-agent v0.12.0 (2026-04-30)
- Python 3.13.5
- Platform: Telegram (also affects Discord — same code path)
Summary
On Telegram/Discord, running
/modelwith no args is documented to show an interactive inline-keyboard picker, but it silently falls back to the text list instead. The picker code path raises aTypeErrorthat's swallowed by a bareexcept Exception: providers = [].Reproduction
hermes-agent v0.12.0/modelwith no arguments/model <name>— switch model" usage hintRoot cause
In
gateway/run.py_handle_model_commandcalls:But
hermes_cli/model_switch.py:list_picker_providersdoes not acceptcurrent_base_urlorcurrent_model:The call raises
TypeError: list_picker_providers() got an unexpected keyword argument 'current_base_url'. That exception is caught by:Empty
providersthen fails theif providers:guard and execution falls through to the text-list fallback. No log, no error to the user, picker just never appears.Suggested fix
list_picker_providersand forward them to the innerlist_authenticated_providerscall:except Exception: providers = []in_handle_model_commandwith at least alogger.warning("list_picker_providers raised: %s", exc, exc_info=True)so future signature drift surfaces in logs.Verified locally
Patched both files on a
v0.12.0install and the inline-keyboard picker appears as expected on Telegram. Happy to open a PR if useful.Environment
hermes-agent v0.12.0 (2026-04-30)