Bug Description
When using kimi-for-coding with Hermes Agent, any session that triggers tool calls becomes permanently broken after several rounds. The Moonshot API returns HTTP 400 because assistant messages containing tool_calls are missing the required reasoning_content field, and this corrupted message stays in conversation history and gets replayed every subsequent turn.
Actual Error Log
Error: Error code: 400 - {'error': {'type': 'invalid_request_error', 'message': 'thinking is enabled but reasoning_content is missing in assistant tool call message at index 2'}, 'type': 'error'}
Steps to Reproduce
1、configure Hermes Agent with kimi-for-coding or kimi-k2.6
2、start a new session and trigger a tool call(ex. can you use lark cli? if you can, create a file)
.
Expected Behavior
expected to call the tool
Actual Behavior
returned api error
API call failed (attempt 1/3): BadRequestError [HTTP 400]
🔌 Provider: kimi-coding Model: kimi-k2.6
🌐 Endpoint: https://api.kimi.com/coding
📝 Error: HTTP 400: thinking is enabled but reasoning_content is missing in assistant tool call message at index 2
📋 Details: {'error': {'type': 'invalid_request_error', 'message': 'thinking is enabled but reasoning_content is missing in assistant tool call message at index 2'}, 'type': 'error'}
⚠️ Non-retryable error (HTTP 400) — trying fallback...
❌ Non-retryable error (HTTP 400): HTTP 400: thinking is enabled but reasoning_content is missing in assistant tool call message at index 2
❌ Non-retryable client error (HTTP 400). Aborting.
🔌 Provider: kimi-coding Model: kimi-k2.6
🌐 Endpoint: https://api.kimi.com/coding
💡 This type of error won't be fixed by retrying.
Affected Component
CLI (interactive chat), Tools (terminal, file ops, web, code execution, etc.), Skills (skill loading, skill hub, skill guard), Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
No response
Debug Report
Report https://paste.rs/6V2iw
agent.log https://paste.rs/MfgGO
Operating System
Ubuntu24.04
Python Version
3.11.15
Hermes Version
2.1.0
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?
Bug Description
When using kimi-for-coding with Hermes Agent, any session that triggers tool calls becomes permanently broken after several rounds. The Moonshot API returns HTTP 400 because assistant messages containing
tool_callsare missing the requiredreasoning_contentfield, and this corrupted message stays in conversation history and gets replayed every subsequent turn.Actual Error Log
Error: Error code: 400 - {'error': {'type': 'invalid_request_error', 'message': 'thinking is enabled but reasoning_content is missing in assistant tool call message at index 2'}, 'type': 'error'}
Steps to Reproduce
1、configure Hermes Agent with kimi-for-coding or kimi-k2.6
2、start a new session and trigger a tool call(ex. can you use lark cli? if you can, create a file)
.
Expected Behavior
expected to call the tool
Actual Behavior
returned api error
⚠️ Non-retryable error (HTTP 400) — trying fallback...
API call failed (attempt 1/3): BadRequestError [HTTP 400]
🔌 Provider: kimi-coding Model: kimi-k2.6
🌐 Endpoint: https://api.kimi.com/coding
📝 Error: HTTP 400: thinking is enabled but reasoning_content is missing in assistant tool call message at index 2
📋 Details: {'error': {'type': 'invalid_request_error', 'message': 'thinking is enabled but reasoning_content is missing in assistant tool call message at index 2'}, 'type': 'error'}
❌ Non-retryable error (HTTP 400): HTTP 400: thinking is enabled but reasoning_content is missing in assistant tool call message at index 2
❌ Non-retryable client error (HTTP 400). Aborting.
🔌 Provider: kimi-coding Model: kimi-k2.6
🌐 Endpoint: https://api.kimi.com/coding
💡 This type of error won't be fixed by retrying.
Affected Component
CLI (interactive chat), Tools (terminal, file ops, web, code execution, etc.), Skills (skill loading, skill hub, skill guard), Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
No response
Debug Report
Operating System
Ubuntu24.04
Python Version
3.11.15
Hermes Version
2.1.0
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
No response
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?