hermes - 💡(How to fix) Fix /model command falls back to plain text instead of interactive picker (API drift in list_picker_providers)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

This causes a TypeError on the two unknown kwargs, which is silently caught by the bare except Exception at line ~7673, providers falls back to [], and the interactive picker is skipped.

Root Cause

Root cause: API drift between gateway/run.py and hermes_cli/model_switch.py.

Code Example

--- a/hermes_cli/model_switch.py
+++ b/hermes_cli/model_switch.py
@@ -1687,6 +1687,8 @@ def list_authenticated_providers(
 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,
@@ -1714,6 +1716,8 @@ def list_picker_providers(
     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,
RAW_BUFFERClick to expand / collapse

Bug: When running /model from Telegram, the interactive inline-keyboard picker is skipped and a plain text model list is returned instead.

Root cause: API drift between gateway/run.py and hermes_cli/model_switch.py.

In run.py:_handle_model_command (line ~7665), list_picker_providers() is called with:

  • current_provider=current_provider
  • current_base_url=current_base_url ← not accepted by list_picker_providers
  • current_model=current_model ← not accepted by list_picker_providers
  • user_providers=user_provs
  • custom_providers=custom_provs
  • max_models=50

However, list_picker_providers() in hermes_cli/model_switch.py (line 1688) only accepts:

  • current_provider
  • user_providers
  • custom_providers
  • max_models

This causes a TypeError on the two unknown kwargs, which is silently caught by the bare except Exception at line ~7673, providers falls back to [], and the interactive picker is skipped.

Fix: Add current_base_url and current_model as parameters to list_picker_providers() and forward them to list_authenticated_providers() where they belong.

--- a/hermes_cli/model_switch.py
+++ b/hermes_cli/model_switch.py
@@ -1687,6 +1687,8 @@ def list_authenticated_providers(
 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,
@@ -1714,6 +1716,8 @@ def list_picker_providers(
     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,

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix /model command falls back to plain text instead of interactive picker (API drift in list_picker_providers)