Bug type
Regression (worked before, now fails)
Summary
HTTP 400 error when using moonshotai/kimi-k2.5: Invalid value 'thinking' not supported by Kimi API
Steps to reproduce
- Configure OpenClaw to use moonshotai/kimi-k2.5 as the primary model
- Set API type to anthropic-messages
- Start any conversation or agent task
- Observe the HTTP 400 error
Expected behavior
When reasoning: false or supportsReasoningEffort: false is configured, OpenClaw should:
- Not send thinking content blocks in API requests
- Filter out or convert thinking content to text before sending
Actual behavior
OpenClaw sends thinking content blocks regardless of the configuration, causing the Kimi API to reject the request with HTTP 400.
Root Cause Analysis
The Anthropic Messages API supports thinking content blocks (used for showing the model's reasoning process), but third-party providers implementing this API compatibility layer
(like Moonshot/Kimi) may not support this extension. OpenClaw appears to hardcode or default to sending thinking blocks without checking the model's compatibility settings.
Proposed Solutions
- Respect compatibility flags: When supportsReasoningEffort: false is set, filter out thinking content blocks before sending to the API
- Content type filtering: Add a per-model configuration option to specify supported content types
- Provider-specific handling: Detect or configure which providers support extended Anthropic API features like thinking
Workaround
Switching to a different model (e.g., zai/glm-4.7 or minimax-portal/MiniMax-M2.5) works correctly as they either support thinking or OpenClaw handles them differently.
Additional Context
- Kimi K2.5 documentation indicates support for text, image_url, video_url, and video content types only
- The issue appears to be specific to the anthropic-messages API implementation in OpenClaw
- Other models using openai-completions API type do not exhibit this issue
Checklist
- I have searched existing issues and this bug has not been reported
- I have tested with the latest version of OpenClaw
- I have provided clear reproduction steps
- I have included relevant configuration and error messages
OpenClaw version
2026.3.13 (61d171a)
Operating system
Windows 11 Home Chinese Version, Version Number: 23H2
- OpenClaw Version: 2026.3.13 (61d171a)
- Operating System: Windows 11
- Model: moonshotai/kimi-k2.5
- Provider: qiniu (via api.qnaigc.com)
- API Type: anthropic-messages
Install method
npm install -g openclaw@latest
Model
moonshotai/kimi-k2.5
Provider / routing chain
model routers:qiniu (via api.qnaigc.com),"baseUrl": "https://api.qnaigc.com" https://developer.qiniu.com/aitokenapi/13195/AI-Coding
Config file / key location
The model is configured with reasoning: false and supportsReasoningEffort: false, but OpenClaw still sends thinking content blocks:
{
"id": "moonshotai/kimi-k2.5",
"name": "Kimi K2.5",
"reasoning": false,
"input": ["text"],
"contextWindow": 256000,
"maxTokens": 8192,
"compat": {
"supportsStore": false,
"supportsDeveloperRole": false,
"supportsReasoningEffort": false
}
}
### Additional provider/model setup details
"models": {
"mode": "merge",
"providers": {
"qiniu": {
"baseUrl": "https://api.qnaigc.com",
"apiKey": "API Key",
"api": "anthropic-messages",
"models": [
{
"id": "moonshotai/kimi-k2.5",
"name": "Kimi K2.5",
"reasoning": false,
"input": ["text"],
"contextWindow": 256000,
"maxTokens": 8192,
"compat": {
"supportsStore": false,
"supportsDeveloperRole": false,
"supportsReasoningEffort": false
}
}
]
}
}
},
"agents": {
"defaults": {
"model": { "primary": "qiniu/moonshotai/kimi-k2.5" },
"models": {
"qiniu/moonshotai/kimi-k2.5": { "alias": "Kimi K2.5" }
},
"workspace": "C:\\Users\\yale2\\.openclaw\\workspace",
"memorySearch": {
"enabled": true,
"cache": {
"enabled": true,
"maxEntries": 50000
}
},
"compaction": {
"mode": "safeguard"
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
}
}
### Logs, screenshots, and evidence
```shell
15:39:42 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 10ms id=d1018384…84a4
15:39:42 info gateway/ws {"subsystem":"gateway/ws"} → close code=1005 durationMs=63 handshake=connected lastFrameType=req lastFrameMethod=logs.tail lastFrameId=d1018384-8993-4613-9983-8120d22284a4
15:39:42 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ node.list 3ms conn=75657f69…1ba0 id=2dd0c7e1…8edb
15:39:43 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"3078773f-ea46-45ea-8676-c69566cbf77d","isError":true,"error":"HTTP 400 invalid_request_error: Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'video'. (type: invalid_request_error) (request_id: sha256:dfd118a6a349)","failoverReason":null,"model":"moonshotai/kimi-k2.5","provider":"qiniu","rawErrorPreview":"400 {\"error\":{\"message\":\"Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'video'. (type: invalid_request_error) (request_id: sha256:dfd118a6a349)\",\"type\":\"invalid_request_error\"}}","rawErrorHash":"sha256:15c2e762d741","rawErrorFingerprint":"sha256:625fe95a4dff","httpCode":"400","providerErrorType":"invalid_request_error","providerErrorMessagePreview":"Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'video'. (type: invalid_request_error) (request_id: sha256:dfd118a6a349)","requestIdHash":"sha256:dfd118a6a349"} embedded run agent end
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → event agent seq=107 clients=1 run=3078773f…f77d agent=main session=main stream=lifecycle aseq=2 phase=error error=HTTP 400 invalid_request_error: Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'vide…
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → event chat seq=108 clients=1
15:39:43 warn Config warnings:\n- plugins.entries.memos-local-openclaw: plugin not found: memos-local-openclaw (stale config entry ignored; remove it from plugins config)
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} ← open remoteAddr=127.0.0.1 conn=b56dd816…de3e
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} ← connect client=cli version=2026.3.13 mode=cli clientId=cli platform=win32 auth=token
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → hello-ok methods=100 events=19 presence=1 stateVersion=2
15:39:43 info [qqbot:channel] listAccountIds: ["default"]
15:39:43 info [qqbot:channel] defaultAccountId: default
15:39:43 info [qqbot:channel] resolveAccount: input=default → resolved=default, appId=1903086420, enabled=true
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → event health seq=109 clients=2 presenceVersion=2 healthVersion=62
Config warnings:\n- plugins.entries.memos-local-openclaw: plugin not found: memos-local-openclaw (stale config entry ignored; remove it from plugins config)
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 4ms id=d878eca6…886d
15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → close code=1005 durationMs=56 handshake=connected lastFrameType=req lastFrameMethod=logs.tail lastFrameId=d878eca6-ebbf-4e6c-8f8b-6f20e680886d
Impact and severity
No response
Additional information

Bug type
Regression (worked before, now fails)
Summary
HTTP 400 error when using moonshotai/kimi-k2.5: Invalid value 'thinking' not supported by Kimi API
Steps to reproduce
Expected behavior
When reasoning: false or supportsReasoningEffort: false is configured, OpenClaw should:
Actual behavior
OpenClaw sends thinking content blocks regardless of the configuration, causing the Kimi API to reject the request with HTTP 400.
Root Cause Analysis
The Anthropic Messages API supports thinking content blocks (used for showing the model's reasoning process), but third-party providers implementing this API compatibility layer
(like Moonshot/Kimi) may not support this extension. OpenClaw appears to hardcode or default to sending thinking blocks without checking the model's compatibility settings.
Proposed Solutions
Workaround
Switching to a different model (e.g., zai/glm-4.7 or minimax-portal/MiniMax-M2.5) works correctly as they either support thinking or OpenClaw handles them differently.
Additional Context
Checklist
OpenClaw version
2026.3.13 (61d171a)
Operating system
Windows 11 Home Chinese Version, Version Number: 23H2
Install method
npm install -g openclaw@latest
Model
moonshotai/kimi-k2.5
Provider / routing chain
model routers:qiniu (via api.qnaigc.com),"baseUrl": "https://api.qnaigc.com" https://developer.qiniu.com/aitokenapi/13195/AI-Coding
Config file / key location
The model is configured with
reasoning: falseandsupportsReasoningEffort: false, but OpenClaw still sendsthinkingcontent blocks:{ "id": "moonshotai/kimi-k2.5", "name": "Kimi K2.5", "reasoning": false, "input": ["text"], "contextWindow": 256000, "maxTokens": 8192, "compat": { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false } } ### Additional provider/model setup details "models": { "mode": "merge", "providers": { "qiniu": { "baseUrl": "https://api.qnaigc.com", "apiKey": "API Key", "api": "anthropic-messages", "models": [ { "id": "moonshotai/kimi-k2.5", "name": "Kimi K2.5", "reasoning": false, "input": ["text"], "contextWindow": 256000, "maxTokens": 8192, "compat": { "supportsStore": false, "supportsDeveloperRole": false, "supportsReasoningEffort": false } } ] } } }, "agents": { "defaults": { "model": { "primary": "qiniu/moonshotai/kimi-k2.5" }, "models": { "qiniu/moonshotai/kimi-k2.5": { "alias": "Kimi K2.5" } }, "workspace": "C:\\Users\\yale2\\.openclaw\\workspace", "memorySearch": { "enabled": true, "cache": { "enabled": true, "maxEntries": 50000 } }, "compaction": { "mode": "safeguard" }, "maxConcurrent": 4, "subagents": { "maxConcurrent": 8 } } } ### Logs, screenshots, and evidence ```shell 15:39:42 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 10ms id=d1018384…84a4 15:39:42 info gateway/ws {"subsystem":"gateway/ws"} → close code=1005 durationMs=63 handshake=connected lastFrameType=req lastFrameMethod=logs.tail lastFrameId=d1018384-8993-4613-9983-8120d22284a4 15:39:42 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ node.list 3ms conn=75657f69…1ba0 id=2dd0c7e1…8edb 15:39:43 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"3078773f-ea46-45ea-8676-c69566cbf77d","isError":true,"error":"HTTP 400 invalid_request_error: Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'video'. (type: invalid_request_error) (request_id: sha256:dfd118a6a349)","failoverReason":null,"model":"moonshotai/kimi-k2.5","provider":"qiniu","rawErrorPreview":"400 {\"error\":{\"message\":\"Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'video'. (type: invalid_request_error) (request_id: sha256:dfd118a6a349)\",\"type\":\"invalid_request_error\"}}","rawErrorHash":"sha256:15c2e762d741","rawErrorFingerprint":"sha256:625fe95a4dff","httpCode":"400","providerErrorType":"invalid_request_error","providerErrorMessagePreview":"Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'video'. (type: invalid_request_error) (request_id: sha256:dfd118a6a349)","requestIdHash":"sha256:dfd118a6a349"} embedded run agent end 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → event agent seq=107 clients=1 run=3078773f…f77d agent=main session=main stream=lifecycle aseq=2 phase=error error=HTTP 400 invalid_request_error: Invalid value: thinking. Supported values are: 'text','image_url','video_url' and 'vide… 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → event chat seq=108 clients=1 15:39:43 warn Config warnings:\n- plugins.entries.memos-local-openclaw: plugin not found: memos-local-openclaw (stale config entry ignored; remove it from plugins config) 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} ← open remoteAddr=127.0.0.1 conn=b56dd816…de3e 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} ← connect client=cli version=2026.3.13 mode=cli clientId=cli platform=win32 auth=token 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → hello-ok methods=100 events=19 presence=1 stateVersion=2 15:39:43 info [qqbot:channel] listAccountIds: ["default"] 15:39:43 info [qqbot:channel] defaultAccountId: default 15:39:43 info [qqbot:channel] resolveAccount: input=default → resolved=default, appId=1903086420, enabled=true 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → event health seq=109 clients=2 presenceVersion=2 healthVersion=62 Config warnings:\n- plugins.entries.memos-local-openclaw: plugin not found: memos-local-openclaw (stale config entry ignored; remove it from plugins config) 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 4ms id=d878eca6…886d 15:39:43 info gateway/ws {"subsystem":"gateway/ws"} → close code=1005 durationMs=56 handshake=connected lastFrameType=req lastFrameMethod=logs.tail lastFrameId=d878eca6-ebbf-4e6c-8f8b-6f20e680886dImpact and severity
No response
Additional information