openclaw - 💡(How to fix) Fix [Bug]: OpenCode Go / Kimi K2.6 sends unsupported reasoning_details in replayed messages

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…

Hi,

I am running OpenClaw v2026.5.12 with the opencode-go/kimi-k2.6 model.

After a few messages, the agent fails with this error:

LLM request failed: provider rejected the request schema or tool payload. 400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details'

Example log:

May 18 23:00:33 openclaw 2026-05-18T23:00:33.881+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=HTTP 500: In ternal Server Error rawError=500 Internal Server Error May 18 23:00:38 openclaw 2026-05-18T23:00:38.848+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details', value: "..."

I tried creating a new session and setting thinkingDefault to off, but the problem still happened.

From what I found, the installed bundle in v2026.5.12 only contains the DeepSeek wrapper for opencode-go:

export { createOpencodeGoDeepSeekV4Wrapper as t };

It does not include a wrapper to strip unsupported reasoning fields for Kimi models.

The issue seems to be that opencode-go/kimi-k2.6 does not accept reasoning fields in replayed assistant messages, especially:

messages[].reasoning_details messages[].reasoning_content messages[].reasoning messages[].reasoning_text

A local hotfix that solved the problem was to wrap the opencode-go stream function for kimi-k2.5 and kimi-k2.6, and strip reasoning fields both at the payload root and inside messages[] / input[].

Example fix:

function isOpencodeGoKimiNoReasoningModelId(modelId) { return typeof modelId === "string" && ( modelId.trim().toLowerCase() === "kimi-k2.5" || modelId.trim().toLowerCase() === "kimi-k2.6" ); }

function stripReasoningFromMessage(msg) { if (!msg || typeof msg !== "object") return;

delete msg.reasoning_details; delete msg.reasoning_content; delete msg.reasoning; delete msg.reasoning_text;

if (Array.isArray(msg.content)) { for (const part of msg.content) { stripReasoningFromMessage(part); } } }

function stripKimiReasoningPayload(payloadObj) { if (!payloadObj || typeof payloadObj !== "object") return;

delete payloadObj.reasoning; delete payloadObj.reasoning_effort; delete payloadObj.reasoningEffort; delete payloadObj.include;

if (Array.isArray(payloadObj.messages)) { for (const msg of payloadObj.messages) { stripReasoningFromMessage(msg); } }

if (Array.isArray(payloadObj.input)) { for (const msg of payloadObj.input) { stripReasoningFromMessage(msg); } } }

Expected behavior:

opencode-go/kimi-k2.6 should not receive any unsupported reasoning fields in the request payload.

Actual behavior:

OpenClaw sends replayed assistant messages containing reasoning_details, and the provider rejects the request with HTTP 400.

Could a Kimi-specific no-reasoning wrapper be added for opencode-go/kimi-k2.5 and opencode-go/kimi-k2.6, similar to the existing DeepSeek wrapper, but also cleaning reasoning fields inside replayed messages?

Error Message

After a few messages, the agent fails with this error: 400 Error from provider: Extra inputs are not permitted, May 18 23:00:33 openclaw 2026-05-18T23:00:33.881+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=HTTP 500: In ternal Server Error rawError=500 Internal Server Error May 18 23:00:38 openclaw 2026-05-18T23:00:38.848+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details', value: "..." error=HTTP 500: Internal Server Error rawError=500 Internal Server Error error=HTTP 500: Internal Server Error error=LLM request failed: provider rejected the request schema or tool payload. The user does not receive an agent reply. OpenClaw surfaces the provider/schema error instead of completing the conversation.

Root Cause

Hi,

I am running OpenClaw v2026.5.12 with the opencode-go/kimi-k2.6 model.

After a few messages, the agent fails with this error:

LLM request failed: provider rejected the request schema or tool payload. 400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details'

Example log:

May 18 23:00:33 openclaw 2026-05-18T23:00:33.881+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=HTTP 500: In ternal Server Error rawError=500 Internal Server Error May 18 23:00:38 openclaw 2026-05-18T23:00:38.848+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details', value: "..."

I tried creating a new session and setting thinkingDefault to off, but the problem still happened.

From what I found, the installed bundle in v2026.5.12 only contains the DeepSeek wrapper for opencode-go:

export { createOpencodeGoDeepSeekV4Wrapper as t };

It does not include a wrapper to strip unsupported reasoning fields for Kimi models.

The issue seems to be that opencode-go/kimi-k2.6 does not accept reasoning fields in replayed assistant messages, especially:

messages[].reasoning_details messages[].reasoning_content messages[].reasoning messages[].reasoning_text

A local hotfix that solved the problem was to wrap the opencode-go stream function for kimi-k2.5 and kimi-k2.6, and strip reasoning fields both at the payload root and inside messages[] / input[].

Example fix:

function isOpencodeGoKimiNoReasoningModelId(modelId) { return typeof modelId === "string" && ( modelId.trim().toLowerCase() === "kimi-k2.5" || modelId.trim().toLowerCase() === "kimi-k2.6" ); }

function stripReasoningFromMessage(msg) { if (!msg || typeof msg !== "object") return;

delete msg.reasoning_details; delete msg.reasoning_content; delete msg.reasoning; delete msg.reasoning_text;

if (Array.isArray(msg.content)) { for (const part of msg.content) { stripReasoningFromMessage(part); } } }

function stripKimiReasoningPayload(payloadObj) { if (!payloadObj || typeof payloadObj !== "object") return;

delete payloadObj.reasoning; delete payloadObj.reasoning_effort; delete payloadObj.reasoningEffort; delete payloadObj.include;

if (Array.isArray(payloadObj.messages)) { for (const msg of payloadObj.messages) { stripReasoningFromMessage(msg); } }

if (Array.isArray(payloadObj.input)) { for (const msg of payloadObj.input) { stripReasoningFromMessage(msg); } } }

Expected behavior:

opencode-go/kimi-k2.6 should not receive any unsupported reasoning fields in the request payload.

Actual behavior:

OpenClaw sends replayed assistant messages containing reasoning_details, and the provider rejects the request with HTTP 400.

Could a Kimi-specific no-reasoning wrapper be added for opencode-go/kimi-k2.5 and opencode-go/kimi-k2.6, similar to the existing DeepSeek wrapper, but also cleaning reasoning fields inside replayed messages?

Fix Action

Fix / Workaround

A local hotfix that solved the problem was to wrap the opencode-go stream function for kimi-k2.5 and kimi-k2.6, and strip reasoning fields both at the payload root and inside messages[] / input[].

A local hotfix that strips these fields from messages[] / input[] prevents the provider from rejecting the request with HTTP 400.

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Hi,

I am running OpenClaw v2026.5.12 with the opencode-go/kimi-k2.6 model.

After a few messages, the agent fails with this error:

LLM request failed: provider rejected the request schema or tool payload. 400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details'

Example log:

May 18 23:00:33 openclaw 2026-05-18T23:00:33.881+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=HTTP 500: In ternal Server Error rawError=500 Internal Server Error May 18 23:00:38 openclaw 2026-05-18T23:00:38.848+00:00 [agent/embedded] embedded run agent end: runId=... isError=true model=kimi-k2.6 provider=opencode-go error=LLM request failed: provider rejected the request schema or tool payload. rawError=400 Error from provider: Extra inputs are not permitted, field: 'messages[5].reasoning_details', value: "..."

I tried creating a new session and setting thinkingDefault to off, but the problem still happened.

From what I found, the installed bundle in v2026.5.12 only contains the DeepSeek wrapper for opencode-go:

export { createOpencodeGoDeepSeekV4Wrapper as t };

It does not include a wrapper to strip unsupported reasoning fields for Kimi models.

The issue seems to be that opencode-go/kimi-k2.6 does not accept reasoning fields in replayed assistant messages, especially:

messages[].reasoning_details messages[].reasoning_content messages[].reasoning messages[].reasoning_text

A local hotfix that solved the problem was to wrap the opencode-go stream function for kimi-k2.5 and kimi-k2.6, and strip reasoning fields both at the payload root and inside messages[] / input[].

Example fix:

function isOpencodeGoKimiNoReasoningModelId(modelId) { return typeof modelId === "string" && ( modelId.trim().toLowerCase() === "kimi-k2.5" || modelId.trim().toLowerCase() === "kimi-k2.6" ); }

function stripReasoningFromMessage(msg) { if (!msg || typeof msg !== "object") return;

delete msg.reasoning_details; delete msg.reasoning_content; delete msg.reasoning; delete msg.reasoning_text;

if (Array.isArray(msg.content)) { for (const part of msg.content) { stripReasoningFromMessage(part); } } }

function stripKimiReasoningPayload(payloadObj) { if (!payloadObj || typeof payloadObj !== "object") return;

delete payloadObj.reasoning; delete payloadObj.reasoning_effort; delete payloadObj.reasoningEffort; delete payloadObj.include;

if (Array.isArray(payloadObj.messages)) { for (const msg of payloadObj.messages) { stripReasoningFromMessage(msg); } }

if (Array.isArray(payloadObj.input)) { for (const msg of payloadObj.input) { stripReasoningFromMessage(msg); } } }

Expected behavior:

opencode-go/kimi-k2.6 should not receive any unsupported reasoning fields in the request payload.

Actual behavior:

OpenClaw sends replayed assistant messages containing reasoning_details, and the provider rejects the request with HTTP 400.

Could a Kimi-specific no-reasoning wrapper be added for opencode-go/kimi-k2.5 and opencode-go/kimi-k2.6, similar to the existing DeepSeek wrapper, but also cleaning reasoning fields inside replayed messages?

Steps to reproduce

Install OpenClaw v2026.5.12. Add opencode-go/kimi-k2.6 Ask a complex task

Expected behavior

For opencode-go/kimi-k2.6 on OpenClaw v2026.5.12, replayed assistant messages should be sanitized before being sent to the provider. The request payload should not contain messages[].reasoning_details or other unsupported reasoning fields.

A local hotfix that strips these fields from messages[] / input[] prevents the provider from rejecting the request with HTTP 400.

Actual behavior

Observed result:

When using OpenClaw v2026.5.12 with opencode-go/kimi-k2.6, the agent stops responding and the gateway logs show provider request failures.

Evidence from the logs:

HTTP 500 errors first appeared:

error=HTTP 500: Internal Server Error rawError=500 Internal Server Error

Then the provider rejected the request schema with HTTP 400:

LLM request failed: provider rejected the request schema or tool payload.

The concrete rejected field was:

field: 'messages[2].reasoning_details'

In a later attempt, the same issue appeared again with another replayed message:

field: 'messages[5].reasoning_details'

The user-visible result is that the embedded agent fails before producing a reply:

Embedded agent failed before reply: LLM request failed: provider rejected the request schema or tool payload.

OpenClaw version

v2026.5.12

Operating system

Ubuntu 26.04

Install method

.npm-global

Model

opencode-go/kimi-k2.6

Provider / routing chain

openclaw -> opencode -> kimi

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected users/systems/channels: The observed affected system is an OpenClaw v2026.5.12 gateway running with the opencode-go/kimi-k2.6 model.

Severity: Blocks workflow. The embedded agent fails before producing a reply.

Evidence: Embedded agent failed before reply: LLM request failed: provider rejected the request schema or tool payload.

Frequency: Observed repeatedly in the same setup. The logs show multiple consecutive failures for the same run/model, including HTTP 500 errors followed by HTTP 400 schema rejection errors.

Evidence: error=HTTP 500: Internal Server Error error=LLM request failed: provider rejected the request schema or tool payload. field: 'messages[2].reasoning_details' field: 'messages[5].reasoning_details'

Consequence: The user does not receive an agent reply. OpenClaw surfaces the provider/schema error instead of completing the conversation.

Evidence: Embedded agent failed before reply FailoverError: LLM request failed: provider rejected the request schema or tool payload.

Additional information

No response

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…

FAQ

Expected behavior

For opencode-go/kimi-k2.6 on OpenClaw v2026.5.12, replayed assistant messages should be sanitized before being sent to the provider. The request payload should not contain messages[].reasoning_details or other unsupported reasoning fields.

A local hotfix that strips these fields from messages[] / input[] prevents the provider from rejecting the request with HTTP 400.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING