hermes - ✅(Solved) Fix [Bug]: switch to kimi-coding-cn manually will cause error [1 pull requests, 1 comments, 2 participants]

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…
GitHub stats
NousResearch/hermes-agent#17739Fetched 2026-05-01 05:56:11
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

However,if I configure KIMI_BASE_URL and KIMI_API_KEY(the value is configured the same as KIMI_CN_API_KEY ) and switch to it (/model kimi-k2.6), no error 4. error

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #17779: fix(providers): kimi-coding-cn alias must not map to kimi-for-coding

Description (problem / solution / changelog)

Problem

providers.py aliased kimi-coding-cnkimi-for-coding, but kimi-coding-cn has its own ProviderConfig in auth.py with KIMI_CN_API_KEY and a different base_url. The alias caused normalize_provider() to return kimi-for-coding which has no registered credentials, leading to unknown provider kimi-for-coding at runtime.

Fix

Remove the incorrect kimi-coding-cnkimi-for-coding alias and add correct aliases kimi-cn and moonshot-cnkimi-coding-cn in providers.py (matching the existing aliases already present in auth.py).

Fixes #17739

Changed files

  • hermes_cli/providers.py (modified, +4/-1)

Code Example

https://paste.rs/xTvyc

---
RAW_BUFFERClick to expand / collapse

Bug Description

if I switch to kimi-coding-cn manually in chat, the agent will read KIMI-FOR-CODING_API_KEY but not KIMI_CN_API_KEY However,if I configure KIMI_BASE_URL and KIMI_API_KEY(the value is configured the same as KIMI_CN_API_KEY ) and switch to it (/model kimi-k2.6), no error It seems the KIMI_CN_API_KEY is never used in hermes?

Steps to Reproduce

  1. setup hermes, use deepseek as default model
  2. config kimi coding cn in .env file (set KIMI_CN_API_KEY=......)
  3. in a chat window (qq here), switch to kimi coding cn (/model kimi-k2.6 --provider kimi-coding-cn)
  4. error
<img width="967" height="1280" alt="Image" src="https://github.com/user-attachments/assets/fda808f8-99be-40be-9763-36f093527e9f" />

Expected Behavior

agent read KIMI_CN_API_KEY

Actual Behavior

agent read KIMI-FOR-CODING_API_KEY

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

https://paste.rs/xTvyc

Operating System

a docker in linux

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue can be resolved by ensuring that the KIMI_CN_API_KEY is correctly configured and used when switching to the kimi-coding-cn model.

Guidance

  • Verify that the KIMI_CN_API_KEY is set correctly in the .env file and that it matches the expected value.
  • Check the configuration files (e.g., config.yaml) to ensure that the KIMI_CN_API_KEY is being used for the kimi-coding-cn model.
  • Investigate why KIMI-FOR-CODING_API_KEY is being used instead of KIMI_CN_API_KEY when switching to the kimi-coding-cn model.
  • Review the debug report at https://paste.rs/xTvyc for any relevant error messages or clues.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The root cause of the issue is unclear, and more information about the Hermes setup and configuration may be needed to provide a definitive fix.

Recommendation

Apply a workaround by verifying the configuration files and ensuring that KIMI_CN_API_KEY is correctly set and used for the kimi-coding-cn model, as this is the most likely cause of the issue.

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