hermes - 💡(How to fix) Fix bug: status.py API Keys section only checks GLM_API_KEY for Z.AI / GLM, missing ZAI_API_KEY and Z_AI_API_KEY

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…

hermes status shows Z.AI / GLM as unconfigured (✗) when the user has ZAI_API_KEY set in .env but not GLM_API_KEY.

Root Cause

In hermes_cli/status.py, the same file has two different check lists for Z.AI / GLM:

Line 136 — "API Keys" section (buggy):

"Z.AI / GLM": "GLM_API_KEY",

Only checks GLM_API_KEY.

Line 360 — "API-Key Providers" section (correct):

"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

Checks all three variants.

The runtime auth logic in hermes_cli/auth.py line 245 is also correct:

api_key_env_vars=("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

Fix Action

Fix

One-line change in hermes_cli/status.py line 136:

# Before
"Z.AI / GLM": "GLM_API_KEY",
# After
"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

Code Example

"Z.AI / GLM": "GLM_API_KEY",

---

"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

---

api_key_env_vars=("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

---

# Before
"Z.AI / GLM": "GLM_API_KEY",
# After
"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),
RAW_BUFFERClick to expand / collapse

Description

hermes status shows Z.AI / GLM as unconfigured (✗) when the user has ZAI_API_KEY set in .env but not GLM_API_KEY.

Root Cause

In hermes_cli/status.py, the same file has two different check lists for Z.AI / GLM:

Line 136 — "API Keys" section (buggy):

"Z.AI / GLM": "GLM_API_KEY",

Only checks GLM_API_KEY.

Line 360 — "API-Key Providers" section (correct):

"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

Checks all three variants.

The runtime auth logic in hermes_cli/auth.py line 245 is also correct:

api_key_env_vars=("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

Fix

One-line change in hermes_cli/status.py line 136:

# Before
"Z.AI / GLM": "GLM_API_KEY",
# After
"Z.AI / GLM": ("GLM_API_KEY", "ZAI_API_KEY", "Z_AI_API_KEY"),

Impact

  • Display-only bug: hermes status shows ✗ for Z.AI / GLM in the "API Keys" section even when ZAI_API_KEY is present
  • Actual provider routing/auth works correctly (auth.py has the full list)
  • Confusing for users who set ZAI_API_KEY instead of GLM_API_KEY

Environment

  • Hermes Agent: latest main (as of 2026-05-30)
  • OS: Windows 10
  • Python: 3.11.9
  • .env contains ZAI_API_KEY (verified present), GLM_API_KEY not set

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 bug: status.py API Keys section only checks GLM_API_KEY for Z.AI / GLM, missing ZAI_API_KEY and Z_AI_API_KEY