openclaw - 💡(How to fix) Fix [Bug]: web_search failed: Kimi API error (400): [3 comments, 4 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
openclaw/openclaw#57459Fetched 2026-04-08 01:49:27
View on GitHub
Comments
3
Participants
4
Timeline
7
Reactions
3
Timeline (top)
commented ×3labeled ×2closed ×1locked ×1

error [tools] web_search failed: Kimi API error (400): {"error":{"message":"thinking is enabled but reasoning_content is missing in assistant tool call message at index 1","type":"invalid_request_error"}}

config: "provider": "kimi", "kimi": { "model": "kimi-k2.5" }

Error Message

error [tools] web_search failed: Kimi API error (400): {"error":{"message":"thinking is enabled but reasoning_content is missing in assistant tool call message at index 1","type":"invalid_request_error"}}

Root Cause

error [tools] web_search failed: Kimi API error (400): {"error":{"message":"thinking is enabled but reasoning_content is missing in assistant tool call message at index 1","type":"invalid_request_error"}}

config: "provider": "kimi", "kimi": { "model": "kimi-k2.5" }

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

error [tools] web_search failed: Kimi API error (400): {"error":{"message":"thinking is enabled but reasoning_content is missing in assistant tool call message at index 1","type":"invalid_request_error"}}

config: "provider": "kimi", "kimi": { "model": "kimi-k2.5" }

Steps to reproduce

Expected behavior

Actual behavior

OpenClaw version

2026.2.17

Operating system

Ubuntu 24.04

Install method

No response

Model

kimi-k2.5

Provider / routing chain

https://api.moonshot.cn/v1

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

The fix involves adding the missing reasoning_content field to the assistant tool call message.

Code Changes

To resolve the issue, update the code that constructs the API request to include the reasoning_content field. Here's an example:

# Assuming the API request is constructed using a dictionary
api_request = {
    # ... other fields ...
    "assistant": {
        "tools": [
            {
                # ... other tool fields ...
                "reasoning_content": "thinking"  # Add this field
            }
        ]
    }
}

Alternatively, if the reasoning_content field is dynamically generated, ensure that it is properly populated before sending the API request.

Verification

To verify the fix, send a test request with the updated reasoning_content field and check the API response for a successful status code (e.g., 200 OK). You can use a tool like curl or a API testing framework to send the request.

Example Test Request

curl -X POST \
  https://api.moonshot.cn/v1 \
  -H 'Content-Type: application/json' \
  -d '{"assistant": {"tools": [{"reasoning_content": "thinking"}]}}'

Replace the URL and request body with your actual API endpoint and request data.

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