openclaw - 💡(How to fix) Fix [Bug] 3.24版本模型多次传递空参数导致工具调用失败 [1 comments, 2 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#56156Fetched 2026-04-08 01:44:21
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

问题描述

在 OpenClaw 3.24 版本中,观察到模型在执行工具调用时多次传递空参数,导致工具验证失败。

受影响的模型

  • Kimi K2.5 coding plan(kimi/k2p5)
  • MiniMax M2.7 (minimax/m2.7)

受影响的工具

  1. exec 工具 - 多次传递空对象 ,导致错误:

  2. read 工具 - 多次传递空路径参数,导致错误:

  3. gm_search 工具 - 同样出现空参数传递

复现方式

此问题持续发生,在单次会话中多次出现:

  • 刚才是我第 6-7 次在调用 exec 时触发此 bug
  • 之前的会话历史中,read 工具也多次出现空参数

环境信息

  • OpenClaw 版本: 3.24
  • 运行环境: Linux 6.17.0-19-generic
  • Node: v22.22.1

期望行为

模型应该正确传递参数,而不是重复发送空参数。

实际行为

模型在工具调用时似乎卡住,连续多次发送空参数,然后才恢复正常。


可能的相关因素:

  • 是否与新版本的 tool calling 实现有关?
  • 是否与特定模型的 function calling 格式解析有关?
  • 是否与会话状态或上下文窗口有关?

请协助调查此问题。

extent analysis

Fix Plan

To address the issue of multiple empty parameters being passed to tools, we need to modify the tool calling implementation in OpenClaw 3.24.

Step-by-Step Solution:

  1. Check and Update Tool Calling Implementation: Review the new tool calling implementation to ensure it correctly handles parameter passing.
  2. Validate Model Function Calling Format: Verify that the function calling format for affected models (Kimi K2.5 and MiniMax M2.7) is correctly parsed.
  3. Implement Parameter Validation: Add checks to ensure that parameters are not empty before passing them to tools.

Example Code Snippet (Node.js):

// Before calling a tool, validate parameters
function callTool(toolName, params) {
  if (!params || Object.keys(params).length === 0) {
    throw new Error(`Empty parameters for tool ${toolName}`);
  }
  // Proceed with calling the tool with validated parameters
  // ...
}

// Example usage:
try {
  const params = { /* parameter object */ };
  callTool('exec', params);
} catch (error) {
  console.error(error);
}

Verification

To verify the fix, test the tool calling functionality with various parameters, including empty ones, to ensure that the implementation correctly handles these cases and does not pass empty parameters to tools.

Extra Tips

  • Regularly review and test changes to the tool calling implementation to prevent similar issues.
  • Consider adding automated tests to cover different scenarios, including edge cases like empty parameters.

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