hermes - ✅(Solved) Fix [Bug]: CLI Reasoning box not displayed for kimi-coding provider in v0.11.0 [1 pull requests, 1 comments, 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#17201Fetched 2026-04-29 06:36:44
View on GitHub
Comments
1
Participants
1
Timeline
9
Reactions
0
Author
Participants
Timeline (top)
labeled ×4referenced ×3commented ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #17210: fix(anthropic_adapter): preserve Kimi thinking blocks and strip signatures to fix intermittent 400s

Description (problem / solution / changelog)

Problem

After upgrading from v0.10.0 to v0.11.0, the CLI no longer displays the Reasoning box when using the kimi-coding provider with kimi-k2.6 model. Additionally, re-enabling thinking causes frequent intermittent HTTP 400 errors during multi-turn tool-calling conversations (closes #17201).

Root Cause 1: Reasoning Box Missing

v0.11.0 introduced two changes that together broke reasoning display for Kimi /coding:

  1. api_mode switched to anthropic_messages: _detect_api_mode_for_url() started routing api.kimi.com/coding to the Anthropic transport.
  2. thinking parameter was disabled for kimi-coding: To avoid HTTP 400 errors, build_anthropic_kwargs() skipped the thinking parameter entirely for kimi-coding endpoints — which meant Kimi stopped returning thinking blocks.

Fix (commit 70d1ed61): Remove the kimi-coding skip in build_anthropic_kwargs(), re-enabling thinking.

Root Cause 2: Intermittent HTTP 400 on Multi-Turn Tool Calls

Kimi's /coding endpoint returns thinking blocks with real non-empty signatures (long base64-like strings). These are Kimi's own opaque tokens, not Anthropic signatures.

The cleanup code in convert_messages_to_anthropic used a truthiness check:

if b.get("signature") or b.get("data"):
    # Anthropic-signed block — strip
    continue
new_content.append(b)

Since Kimi's signatures are truthy (non-empty strings), this stripped ALL thinking blocks from Kimi assistant messages. On replay, Kimi's history validation requires thinking blocks on tool-call messages — finding none, it returns HTTP 400.

Why It's Intermittent

The 400 only triggers on the 2nd+ API call in a multi-turn conversation with tool calls, because that's when prior assistant messages with (now-stripped) thinking blocks get replayed. First-turn requests always succeed.

Fix

Preserve all Kimi thinking blocks but strip only the signature and data fields. Emit the minimal {"type": "thinking", "thinking": "..."} shape that Kimi accepts for replayed history:

if _is_kimi:
    new_content = []
    for b in m["content"]:
        if not isinstance(b, dict) or b.get("type") not in _THINKING_TYPES:
            new_content.append(b)
            continue
        thinking_text = b.get("thinking", "")
        new_content.append({"type": b["type"], "thinking": thinking_text})
    m["content"] = new_content or [{"type": "text", "text": "(empty)"}]

Verification

  • Live 3-turn tool-call conversation against api.kimi.com/coding with kimi-k2.6 — all turns succeeded, no 400 errors
  • All 26 related unit tests pass (test_kimi_coding_anthropic_thinking.py + thinking/reasoning tests in test_anthropic_adapter.py)

Changes

  • agent/anthropic_adapter.py:
    • Re-enable thinking for kimi-coding (commit 1)
    • Preserve Kimi thinking blocks, strip only signature/data fields (commits 2-3)
  • tests/agent/test_kimi_coding_anthropic_thinking.py: Updated test expectations

Changed files

  • agent/anthropic_adapter.py (modified, +18/-13)
  • tests/agent/test_kimi_coding_anthropic_thinking.py (modified, +7/-8)

Code Example

display:
    show_reasoning: true
    streaming: true
RAW_BUFFERClick to expand / collapse

Bug Description

After upgrading from v0.10.0 to v0.11.0, the CLI no longer displays the Reasoning box when using the kimi-coding provider with kimi-k2.6 model.

Evidence

v0.10.0 — Reasoning box displayed correctly

<img width="1147" alt="v0.10.0" src="https://github.com/user-attachments/assets/f57d6d2f-f02d-4dcd-a124-15577473b13f">

v0.11.0 — No Reasoning box, only response box

<img width="1076" alt="v0.11.0" src="https://github.com/user-attachments/assets/b144e455-4b57-446f-ac08-961be9910425">

Same config, same model, same prompt.

Environment

Expected Behavior

The Reasoning box should display in v0.11.0 just as it did in v0.10.0, given identical config.

extent analysis

TL;DR

The issue is likely due to a compatibility problem between the kimi-coding provider and the kimi-k2.6 model in version v0.11.0, and downgrading to v0.10.0 or waiting for a patch may resolve the issue.

Guidance

  • Verify that the display.show_reasoning config option is correctly parsed and applied in v0.11.0 by checking the application logs or debugging the configuration loading process.
  • Check the release notes for v0.11.0 to see if there are any known issues or changes related to the kimi-coding provider or kimi-k2.6 model.
  • Test the application with a different provider or model in v0.11.0 to isolate the issue and determine if it's specific to the kimi-coding provider or kimi-k2.6 model.
  • Consider reaching out to the maintainers of the kimi-coding provider or kimi-k2.6 model for guidance on compatibility with v0.11.0.

Notes

The issue seems to be specific to the combination of kimi-coding provider, kimi-k2.6 model, and v0.11.0, and more information about the changes in v0.11.0 would be needed to provide a more specific solution.

Recommendation

Apply workaround: Downgrade to v0.10.0 until a patch is released that addresses the compatibility issue, as this version is known to work correctly with the kimi-coding provider and kimi-k2.6 model.

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