hermes - ✅(Solved) Fix [Bug]: kimi-k2.5 incorrectly classified as instant mode (temperature=0.6) instead of thinking mode (temperature=1.0) [4 pull requests, 1 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#12745Fetched 2026-04-20 12:17:10
View on GitHub
Comments
0
Participants
1
Timeline
13
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×5referenced ×5closed ×1labeled ×1

Error Message

Observe error: HTTP 400: invalid temperature: only 1 is allowed for this model Observe error: HTTP 400: invalid temperature: only 1 is allowed for this model

Additional Logs / Traceback (optional)

Root Cause

text HTTP 400: invalid temperature: only 1 is allowed for this model Root Cause

Fix Action

Fix / Workaround

Workaround

PR fix notes

PR #12760: fix: move kimi-k2.5 from instant to thinking models

Description (problem / solution / changelog)

Problem

\kimi-k2.5\ was incorrectly classified in _KIMI_INSTANT_MODELS\ (temperature=0.6), but Moonshot's API requires temperature=1.0 (thinking mode) for this model. This causes HTTP 400: \invalid temperature: only 1 is allowed for this model.

Fix

Move \kimi-k2.5\ from _KIMI_INSTANT_MODELS\ to _KIMI_THINKING_MODELS.

One-line change in \gent/auxiliary_client.py.

Reference: https://platform.kimi.ai/docs/guide/kimi-k2-5-quickstart

Fixes #12745

Changed files

  • agent/auxiliary_client.py (modified, +1/-1)

PR #12772: fix: move kimi-k2.5 to thinking models

Description (problem / solution / changelog)

Fixes #12745

kimi-k2.5 was incorrectly classified in _KIMI_INSTANT_MODELS (temperature=0.6). The Moonshot API requires temperature=1.0 for this model (thinking mode), so it belongs in _KIMI_THINKING_MODELS.

Changes:

  • Moved kimi-k2.5 from _KIMI_INSTANT_MODELS to _KIMI_THINKING_MODELS in agent/auxiliary_client.py
  • Added test verifying kimi-k2.5 is classified as a thinking model

Changed files

  • agent/auxiliary_client.py (modified, +1/-1)
  • tests/run_agent/test_provider_parity.py (modified, +11/-0)

PR #12806: fix: include api.moonshot.cn in public API temperature override (#12745)

Description (problem / solution / changelog)

Problem

kimi-k2.5 on api.moonshot.cn/v1 fails with HTTP 400: invalid temperature: only 1 is allowed for this model.

The existing public API override only matches api.moonshot.ai, but Moonshot also serves the same API at api.moonshot.cn. Users in China typically use the .cn domain.

Fixes #12745

Changes

  • agent/auxiliary_client.py: Added api.moonshot.cn to the public API domain check in _fixed_temperature_for_model()
  • tests/agent/test_auxiliary_client.py: Added api.moonshot.cn test cases to the parametrized test

Testing

All 5 parametrized cases pass:

5 passed in 3.51s

Changed files

  • agent/auxiliary_client.py (modified, +1/-1)
  • tests/agent/test_auxiliary_client.py (modified, +2/-0)

PR #12861: fix(kimi): include api.moonshot.cn in public temperature override

Description (problem / solution / changelog)

Salvage of #12806 by @kagura-agent onto current main.

Summary

  • extend the public Moonshot temperature override to api.moonshot.cn as well as api.moonshot.ai
  • preserve the existing Coding Plan behavior on api.kimi.com/coding
  • add direct-call regression coverage for the China endpoint in run_agent and the trajectory compressor paths

Why

Current main already routes api.moonshot.cn as a Moonshot/Kimi provider in other places, but _fixed_temperature_for_model() only treated api.moonshot.ai as the public endpoint. That left China users on api.moonshot.cn/v1 still hitting:

invalid temperature: only 1 is allowed for this model

Validation

  • targeted pytest: 7 passed
    • tests/agent/test_auxiliary_client.py
    • tests/run_agent/test_run_agent.py
    • tests/test_trajectory_compressor.py
    • tests/test_trajectory_compressor_async.py
  • isolated E2E import check:
    • api.moonshot.cn/v1 -> temperature=1.0
    • api.kimi.com/coding/v1 -> temperature=0.6

Contributor authorship preserved via cherry-pick.

Closes #12745 Refs #12835

Changed files

  • agent/auxiliary_client.py (modified, +1/-1)
  • tests/agent/test_auxiliary_client.py (modified, +2/-0)
  • tests/run_agent/test_run_agent.py (modified, +10/-0)
  • tests/test_trajectory_compressor.py (modified, +24/-0)
  • tests/test_trajectory_compressor_async.py (modified, +29/-0)

Code Example

N/A

---
RAW_BUFFERClick to expand / collapse

Bug Description

Description Problem

When using the kimi-k2.5 model via Moonshot API (api.moonshot.cn/v1), Hermes Agent fails with HTTP 400:

text HTTP 400: invalid temperature: only 1 is allowed for this model Root Cause

In agent/auxiliary_client.py, kimi-k2.5 is incorrectly placed in _KIMI_INSTANT_MODELS:

python _KIMI_INSTANT_MODELS: frozenset = frozenset({ "kimi-k2.5", # ❌ Wrong: should be thinking mode "kimi-k2-turbo-preview", "kimi-k2-0905-preview", })

_KIMI_THINKING_MODELS: frozenset = frozenset({ "kimi-k2-thinking", "kimi-k2-thinking-turbo", }) According to Moonshot's official documentation:

Thinking mode requires temperature = 1.0

Instant mode requires temperature = 0.6

The API endpoint for kimi-k2.5 expects thinking mode (temperature=1.0), but the code returns 0.6 due to the incorrect classification.

Fix

Move kimi-k2.5 from _KIMI_INSTANT_MODELS to _KIMI_THINKING_MODELS:

python _KIMI_INSTANT_MODELS: frozenset = frozenset({ # "kimi-k2.5", # Removed from instant "kimi-k2-turbo-preview", "kimi-k2-0905-preview", })

_KIMI_THINKING_MODELS: frozenset = frozenset({ "kimi-k2.5", # Added to thinking "kimi-k2-thinking", "kimi-k2-thinking-turbo", }) Alternatively, add a specific override in _fixed_temperature_for_model():

python def _fixed_temperature_for_model(model: Optional[str]) -> Optional[float]: normalized = (model or "").strip().lower()

# Force kimi-k2.5 to use thinking mode (temperature=1.0)
if "kimi-k2.5" in normalized:
    return 1.0

# ... rest of existing logic

Reproduction Steps

Configure Hermes to use Moonshot API with kimi-k2.5:

yaml model: default: "custom/kimi-k2.5"

providers: custom: api_key: "your-moonshot-api-key" base_url: "https://api.moonshot.cn/v1" Run hermes

Observe error: HTTP 400: invalid temperature: only 1 is allowed for this model

Expected Behavior

kimi-k2.5 should use temperature=1.0 (thinking mode) and successfully connect to the API.

Environment

Hermes Agent version: (your version)

Model: kimi-k2.5 via Moonshot API

Platform: (your OS / WSL info)

Workaround

Manually edit agent/auxiliary_client.py to move kimi-k2.5 to _KIMI_THINKING_MODELS as described above.

Additional Context The same classification issue may affect other kimi-k2.* models. Please verify the correct temperature for each variant according to Moonshot's documentation.

Steps to Reproduce

Reproduction Steps

Configure Hermes to use Moonshot API with kimi-k2.5:

yaml model: default: "custom/kimi-k2.5"

providers: custom: api_key: "your-moonshot-api-key" base_url: "https://api.moonshot.cn/v1" Run hermes

Observe error: HTTP 400: invalid temperature: only 1 is allowed for this model

Expected Behavior

kimi-k2.5 should use temperature=1.0 (thinking mode) and successfully connect to the API.

Actual Behavior

HTTP 400: invalid temperature: only 1 is allowed for this model

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

N/A

Operating System

ubuntu

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Move kimi-k2.5 from _KIMI_INSTANT_MODELS to _KIMI_THINKING_MODELS:

python _KIMI_INSTANT_MODELS: frozenset = frozenset({ # "kimi-k2.5", # Removed from instant "kimi-k2-turbo-preview", "kimi-k2-0905-preview", })

_KIMI_THINKING_MODELS: frozenset = frozenset({ "kimi-k2.5", # Added to thinking "kimi-k2-thinking", "kimi-k2-thinking-turbo", })

Are you willing to submit a PR for this?

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

extent analysis

TL;DR

Move kimi-k2.5 from _KIMI_INSTANT_MODELS to _KIMI_THINKING_MODELS to fix the temperature setting issue.

Guidance

  • Verify that the kimi-k2.5 model requires a temperature of 1.0 according to Moonshot's documentation.
  • Update the _KIMI_INSTANT_MODELS and _KIMI_THINKING_MODELS sets in agent/auxiliary_client.py to correctly classify kimi-k2.5 as a thinking model.
  • Alternatively, add a specific override in _fixed_temperature_for_model() to force kimi-k2.5 to use a temperature of 1.0.
  • Test the changes by running Hermes with the updated configuration and verify that the HTTP 400 error is resolved.

Example

_KIMI_INSTANT_MODELS: frozenset = frozenset({
    "kimi-k2-turbo-preview",
    "kimi-k2-0905-preview",
})

_KIMI_THINKING_MODELS: frozenset = frozenset({
    "kimi-k2.5",
    "kimi-k2-thinking",
    "kimi-k2-thinking-turbo",
})

Notes

This fix assumes that the issue is solely due to the incorrect classification of kimi-k2.5 as an instant model. If other models are affected, additional changes may be necessary.

Recommendation

Apply the workaround by moving kimi-k2.5 to _KIMI_THINKING_MODELS or adding a specific override in _fixed_temperature_for_model(), as this directly addresses the root 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

hermes - ✅(Solved) Fix [Bug]: kimi-k2.5 incorrectly classified as instant mode (temperature=0.6) instead of thinking mode (temperature=1.0) [4 pull requests, 1 participants]