Bug Summary
When thinkingDefault is enabled (medium/high/etc.), OpenClaw 2026.5.12 fails with Kimi (kimi-for-coding via openai-completions API) on multi-turn sessions that contain tool calls. The error is:
400 thinking is enabled but reasoning_content is missing in assistant tool call message at index 69
This is a different issue from #47452 (which was fixed in 5.12). #47452 fixed the case where Kimi rejected thinking content blocks in replay history. Now the opposite problem occurs: when thinking is enabled, Kimi requires reasoning_content on assistant tool-call messages, but OpenClaw does not populate it.
Environment
| Item |
Value |
| OpenClaw Version |
2026.5.12 (f066dd2) |
| Model |
kimi-for-coding |
| Provider |
kimi |
| API Type |
openai-completions |
| Model Config |
reasoning: true |
| thinkingDefault |
medium |
Model configuration excerpt
{
"models": {
"providers": {
"kimi": {
"baseUrl": "https://api.kimi.com/coding/v1",
"api": "openai-completions",
"models": [
{
"id": "kimi-for-coding",
"reasoning": true,
...
}
]
}
}
},
"agents": {
"defaults": {
"thinkingDefault": "medium"
}
}
}
Reproduction Steps
- Configure OpenClaw with Kimi model and
thinkingDefault: "medium"
- Start a conversation that triggers tool calls (e.g., active-memory, file operations)
- On the second or later turn, when replay history includes assistant tool-call messages, Kimi API returns 400
Error Log
{
"event": "embedded_run_agent_end",
"error": "LLM request failed: provider rejected the request schema or tool payload.",
"rawErrorPreview": "400 thinking is enabled but reasoning_content is missing in assistant tool call message at index 69",
"providerRuntimeFailureKind": "schema",
"model": "kimi-for-coding",
"provider": "kimi"
}
Full stack trace from ~/.openclaw/logs/:
400 thinking is enabled but reasoning_content is missing in assistant tool call message at index 69
Expected Behavior
When thinkingDefault is enabled for Kimi models, OpenClaw should ensure that assistant messages containing tool calls also include a reasoning_content field (even if empty "") so that Kimi API accepts the replayed history.
Actual Behavior
OpenClaw sends assistant tool-call messages without reasoning_content, causing Kimi to reject the entire request with HTTP 400.
Additional Context
Suggested Fix
In the message serialization path for Kimi (Moonshot) provider, when thinking is enabled, ensure that all assistant messages in the replay history — including those with tool_calls — have reasoning_content set (defaulting to "" if no reasoning text is available).
Bug Summary
When
thinkingDefaultis enabled (medium/high/etc.), OpenClaw 2026.5.12 fails with Kimi (kimi-for-codingviaopenai-completionsAPI) on multi-turn sessions that contain tool calls. The error is:This is a different issue from #47452 (which was fixed in 5.12). #47452 fixed the case where Kimi rejected
thinkingcontent blocks in replay history. Now the opposite problem occurs: when thinking is enabled, Kimi requiresreasoning_contenton assistant tool-call messages, but OpenClaw does not populate it.Environment
kimi-for-codingkimiopenai-completionsreasoning: truemediumModel configuration excerpt
{ "models": { "providers": { "kimi": { "baseUrl": "https://api.kimi.com/coding/v1", "api": "openai-completions", "models": [ { "id": "kimi-for-coding", "reasoning": true, ... } ] } } }, "agents": { "defaults": { "thinkingDefault": "medium" } } }Reproduction Steps
thinkingDefault: "medium"Error Log
{ "event": "embedded_run_agent_end", "error": "LLM request failed: provider rejected the request schema or tool payload.", "rawErrorPreview": "400 thinking is enabled but reasoning_content is missing in assistant tool call message at index 69", "providerRuntimeFailureKind": "schema", "model": "kimi-for-coding", "provider": "kimi" }Full stack trace from
~/.openclaw/logs/:Expected Behavior
When
thinkingDefaultis enabled for Kimi models, OpenClaw should ensure that assistant messages containing tool calls also include areasoning_contentfield (even if empty"") so that Kimi API accepts the replayed history.Actual Behavior
OpenClaw sends assistant tool-call messages without
reasoning_content, causing Kimi to reject the entire request with HTTP 400.Additional Context
thinkingDefault: "off", everything works fine.memory_search/memory_get).Suggested Fix
In the message serialization path for Kimi (Moonshot) provider, when
thinkingis enabled, ensure that all assistant messages in the replay history — including those withtool_calls— havereasoning_contentset (defaulting to""if no reasoning text is available).