openclaw - ✅(Solved) Fix [Bug]: [Critical] Kimi/k2p5 模型工具调用参数全部丢失 - arguments: {} [1 pull requests, 3 comments, 3 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#59327Fetched 2026-04-08 02:25:59
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
1
Timeline (top)
commented ×3cross-referenced ×2labeled ×2closed ×1

Fix Action

Fixed

PR fix notes

PR #59440: fix: normalize Kimi anthropic tool payloads

Description (problem / solution / changelog)

Summary

  • mark Kimi and Kimi Coding as OpenAI-function-style Anthropic tool payload providers
  • align the bundled plugin capability metadata with the fallback capability registry
  • add regression coverage for Kimi payload normalization on the Anthropic Messages path

Fixes #59327 Fixes #54442 Fixes #58817 Fixes #53747 Fixes #56916

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/kimi-coding/index.ts (modified, +2/-0)
  • src/agents/pi-embedded-runner-extraparams.test.ts (modified, +71/-8)
  • src/agents/provider-capabilities.test.ts (modified, +13/-6)
  • src/agents/provider-capabilities.ts (modified, +2/-0)

Code Example

openclaw chat --model kimi/k2p5

### Steps to reproduce

exec({"command": "pwd"})
read({"path": "/Users/yy/projects/file.ts"})
sessions_spawn({"task": "example task"})
edit({"file": "test.txt", "oldString": "a", "newString": "b"})

### Expected behavior

{"type":"toolCall","name":"exec","arguments":{"command":"pwd"}}

### Actual behavior

{"type":"toolCall","name":"exec","arguments":{}}

### OpenClaw version

2026.3.28

### Operating system

macOS Tahoe Version26.2

### Install method

npm global

### Model

kimi code k2p5

### Provider / routing chain

openclaw -> cloudflare -> ai - gateway -> kimi code k2p5

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

🐛 Bug 描述

严重程度: 🔴 Critical - 完全阻断所有功能

Kimi/k2p5 模型在工具调用时,所有参数都丢失,arguments 对象变为空 {}。这导致 所有工具调用完全失效(exec, read, sessions_spawn, edit 等)。

🌍 环境信息

  • OpenClaw 版本: (请填写)
  • 运行时模型: kimi/k2p5
  • 默认模型: kimi/k2p5
  • 操作系统: macOS Darwin 25.2.0 (arm64)
  • Node.js: v22.22.0
  • API: anthropic-messages
  • Shell: zsh

🔄 复现步骤

1. 启动 k2p5 会话

openclaw chat --model kimi/k2p5

### Steps to reproduce

exec({"command": "pwd"})
read({"path": "/Users/yy/projects/file.ts"})
sessions_spawn({"task": "example task"})
edit({"file": "test.txt", "oldString": "a", "newString": "b"})

### Expected behavior

{"type":"toolCall","name":"exec","arguments":{"command":"pwd"}}

### Actual behavior

{"type":"toolCall","name":"exec","arguments":{}}

### OpenClaw version

2026.3.28

### Operating system

macOS Tahoe Version26.2

### Install method

npm global

### Model

kimi code k2p5

### Provider / routing chain

openclaw -> cloudflare -> ai - gateway -> kimi code k2p5

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell

Impact and severity

工具状态错误信息
exec❌ 失效command: must have required property
read❌ 失效path alias: must have required property
edit❌ 失效参数验证失败
sessions_spawn❌ 失效task: must have required property
sessions_send❌ 失效message: must have required property
web_fetch❌ 失效url: must have required property
web_search❌ 失效API 错误

受影响用户 • 所有使用 kimi/k2p5 的会话 完全无法工作 • 子代理同样受影响

📝 证据日志 原始会话日志片段(来自 transcript) {"type":"toolCall","id":"tool_pR51wvCltla9rNvje23CQkUQ","name":"exec","arguments":{}} {"type":"toolResult","toolCallId":"tool_pR51wvCltla9rNvje23CQkUQ","toolName":"exec","content":[{ "type":"text", "text":"Validation failed for tool "exec":\n - command: must have required property 'command'\n\nReceived arguments:\n{}" }]} 子代理执行失败(10分钟超时,335k tokens 浪费) Stats: runtime 10m0s • tokens 335.0k (in 332.9k / out 2.2k) Status: timed out

Result: Validation failed for tool "exec":

  • command: must have required property 'command' Received arguments: {}

根本原因分析: 问题发生在 模型生成 tool call 后 到 执行前 的参数序列化/转换层:

  1. ✅ 模型正确生成了工具调用意图
  2. ❌ 但 arguments 对象在传递过程中变成空 {}
  3. ❌ 导致所有工具验证失败

疑似问题位置: • OpenClaw 的 Kimi/k2p5 适配器 • Anthropic Messages API 格式转换层

Additional information

验证过的解决方案

方案状态说明
切换到 Claude 模型✅ 有效claude-sonnet-4-20250514 正常工作
切换到 GPT-4o✅ 有效工具调用正常
继续使用 k2p5❌ 无效完全无法工作

extent analysis

TL;DR

Switching to a different model like Claude or GPT-4o resolves the issue of lost parameters in tool calls.

Guidance

  1. Verify the model: Confirm that the issue is specific to the Kimi/k2p5 model by testing other models like Claude or GPT-4o.
  2. Check the OpenClaw adapter: Investigate the OpenClaw adapter for the Kimi/k2p5 model to ensure it is correctly handling parameter serialization.
  3. Inspect the Anthropic Messages API: Review the Anthropic Messages API format conversion layer to identify potential issues with parameter passing.
  4. Test with a minimal tool call: Try a simple tool call with minimal parameters to isolate the issue and determine if it's related to specific parameters or the overall serialization process.

Example

No specific code example is provided due to the lack of detailed implementation details in the issue description.

Notes

The root cause of the issue seems to be related to the parameter serialization or conversion layer between the model and the tool execution. The fact that switching to different models resolves the issue suggests a model-specific or adapter-specific problem.

Recommendation

Apply a workaround by switching to a different model like Claude or GPT-4o until the issue with the Kimi/k2p5 model is resolved. This recommendation is based on the verification that these models work correctly and the issue seems to be model-specific.

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

{"type":"toolCall","name":"exec","arguments":{"command":"pwd"}}

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: [Critical] Kimi/k2p5 模型工具调用参数全部丢失 - arguments: {} [1 pull requests, 3 comments, 3 participants]