hermes - 💡(How to fix) Fix Empty credential pool entries cause providers to show as authenticated in /model picker [4 pull requests]

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…

When a provider is removed from .env (e.g. MINIMAX_CN_API_KEY deleted), but an empty credential pool entry remains in auth.json, the /model picker still shows the provider as available.

Root Cause

In hermes_cli/model_switch.py (line 1234-1236):

if store and hermes_id in store.get("credential_pool", {}):
    has_creds = True

The check only verifies that hermes_id is a key in the credential_pool dict. It does NOT check whether the array is non-empty. So "minimax-cn": [] still evaluates to has_creds = True.

Fix Action

Fixed

Code Example

if store and hermes_id in store.get("credential_pool", {}):
    has_creds = True

---

pool_entries = store.get("credential_pool", {}).get(hermes_id, [])
if pool_entries:
    has_creds = True
RAW_BUFFERClick to expand / collapse

Description

When a provider is removed from .env (e.g. MINIMAX_CN_API_KEY deleted), but an empty credential pool entry remains in auth.json, the /model picker still shows the provider as available.

Steps to Reproduce

  1. Configure minimax-cn via hermes model or by setting MINIMAX_CN_API_KEY in .env
  2. Remove the env var from .env
  3. Observe that ~/.hermes/auth.json still has "minimax-cn": [] in credential_pool
  4. Run /model in Telegram/Discord — minimax-cn still appears as selectable

Root Cause

In hermes_cli/model_switch.py (line 1234-1236):

if store and hermes_id in store.get("credential_pool", {}):
    has_creds = True

The check only verifies that hermes_id is a key in the credential_pool dict. It does NOT check whether the array is non-empty. So "minimax-cn": [] still evaluates to has_creds = True.

Expected Behavior

An empty credential pool entry should be treated the same as no entry — the provider should not appear in the /model picker unless it has actual credentials.

Suggested Fix

pool_entries = store.get("credential_pool", {}).get(hermes_id, [])
if pool_entries:
    has_creds = True

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 Empty credential pool entries cause providers to show as authenticated in /model picker [4 pull requests]