hermes - ✅(Solved) Fix Kimi provider model ID mapping: auto-discovered 'k2p6' fails, manual 'kimi-k2.6' works [1 pull requests, 2 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#13758Fetched 2026-04-22 08:04:18
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Error Message

When configuring the Kimi provider in Hermes, the auto-discovered model name k2p6 (shown in the dropdown/model list) does not match the actual model ID expected by the Moonshot API (kimi-k2.6). This causes all API requests to fail with a model-not-found error. 4. Actual: Connection fails / model not found error.

Root Cause

The model display name / auto-discovery list uses k2p6, but the API expects kimi-k2.6. The two are not mapped correctly for the Kimi provider.

Fix Action

Fix / Workaround

  1. Go to model configuration for the Kimi provider.
  2. Select k2p6 from the auto-discovered model list.
  3. Try to send a message.
  4. Actual: Connection fails / model not found error.
  5. Workaround: Manually type kimi-k2.6 as the model name instead of using the dropdown.
  6. Expected: API works correctly.

PR fix notes

PR #13802: fix(kimi): map auto-discovered short model IDs to API-accepted names (Closes #13758)

Description (problem / solution / changelog)

Summary

The Kimi/Moonshot /models endpoint returns internal short-form IDs (e.g. k2p6) in its auto-discovery list, but the actual API only accepts canonical model names (e.g. kimi-k2.6). Selecting k2p6 from the dropdown therefore fails with a model-not-found error.

Fix: In normalize_model_for_provider(), add a Kimi-specific short-ID → canonical-ID mapping for kimi-coding, kimi-coding-cn, and moonshot providers.

Changes

  • hermes_cli/model_normalize.py: Add short-ID mapping (k2p6kimi-k2.6, k2p5kimi-k2.5, k2p8kimi-k2.8) for Kimi/Moonshot providers

Testing

  • normalize_model_for_provider("k2p6", "kimi-coding")"kimi-k2.6"
  • normalize_model_for_provider("moonshotai/k2p5", "kimi-coding-cn")"kimi-k2.5"

Closes #13758

Changed files

  • agent/prompt_builder.py (modified, +7/-1)
  • hermes_cli/model_normalize.py (modified, +17/-0)
  • tests/agent/test_prompt_builder.py (modified, +18/-0)
RAW_BUFFERClick to expand / collapse

Bug Description

When configuring the Kimi provider in Hermes, the auto-discovered model name k2p6 (shown in the dropdown/model list) does not match the actual model ID expected by the Moonshot API (kimi-k2.6). This causes all API requests to fail with a model-not-found error.

Steps to Reproduce

  1. Go to model configuration for the Kimi provider.
  2. Select k2p6 from the auto-discovered model list.
  3. Try to send a message.
  4. Actual: Connection fails / model not found error.
  5. Workaround: Manually type kimi-k2.6 as the model name instead of using the dropdown.
  6. Expected: API works correctly.

Root Cause

The model display name / auto-discovery list uses k2p6, but the API expects kimi-k2.6. The two are not mapped correctly for the Kimi provider.

Environment

  • Hermes version: latest
  • Provider: Kimi (Moonshot)
  • Model: k2p6 (auto-discovered) vs kimi-k2.6 (manual)

Related

  • Possibly related to #13692 (model auto-correct logic), but this is specifically a display name ↔ API model ID mapping issue for the Kimi provider.

extent analysis

TL;DR

Update the model display name to API model ID mapping for the Kimi provider to correctly map k2p6 to kimi-k2.6.

Guidance

  • Verify the model mapping configuration for the Kimi provider to ensure that k2p6 is correctly mapped to kimi-k2.6.
  • Check if there are any existing mapping overrides or custom configurations that may be causing the mismatch.
  • Consider updating the auto-discovery logic to correctly handle the model name formatting for the Kimi provider.
  • Test the workaround of manually typing kimi-k2.6 as the model name to confirm that it resolves the issue.

Example

No code snippet is provided as the issue does not imply a specific code change.

Notes

The issue seems to be specific to the Kimi provider and the k2p6 model, so any changes should be carefully tested to ensure they do not introduce issues with other providers or models.

Recommendation

Apply workaround: Manually type kimi-k2.6 as the model name instead of using the dropdown, until a permanent fix for the model mapping can be implemented. This is because the workaround has been confirmed to work and allows for continued use of the API while a more permanent solution is developed.

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