Skip to content

[Bug]: [Critical] Kimi/k2p5 模型工具调用参数全部丢失 - arguments: {} #59327

Description

@PeterYuWXY

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 ❌ 无效 完全无法工作

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions