Skip to content

MiniMax models' tool calls are stripped instead of executed #10

@KingsYR123

Description

@KingsYR123

MiniMax models' tool calls are stripped instead of executed
Image

MiniMax 在 anthropic-messages API 中返回工具调用时,使用 XML 文本格式而非标准的 tool_use 结构化块:

问题描述

MiniMax 在 anthropic-messages API 中返回工具调用时,使用 XML 文本格式而非标准的 tool_use 结构化块:

MiniMax 实际返回

{
  "content": [
    {
      "type": "text",
      "text": "<minimax:tool_call>\n  <invoke name=\"exec\">\n    <parameter name=\"command\">ls</parameter>\n  </invoke>\n</minimax:tool_call>"
    }
  ]
}

OpenClaw 期望

{
  "content": [
    {
      "type": "tool_use",
      "id": "toolu_xxx",
      "name": "exec",
      "input": {
        "command": "ls"
      }
    }
  ]
}
<minimax:tool_call>
  <invoke name="exec">
    <parameter name="command">...</parameter>
  </invoke>
</minimax:tool_call>

Currently, stripMinimaxToolCallXml() in dist/image-BvuShkXY.js removes these as "malformed" content instead of executing them.

Expected

Parse and execute minimax:tool_call blocks as valid tool invocations.

Config

- Provider: minimax-portal
- API: anthropic-messages
- Model: MiniMax-M2.5 / MiniMax-M2.5-highspeed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions