MiniMax models' tool calls are stripped instead of executed

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
api, backend

Research direction

The report names stripMinimaxToolCallXml() in dist/image-BvuShkXY.js as the entry point. Read that function and trace how the anthropic-messages response is handled for the minimax-portal provider. Implement parsing and execution for the shown minimax:tool_call format; done means the example invoke is executed as a tool call instead of being stripped.

Written by the indexing model from the issue text.

Description

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
Dominant language
No language data
Stars
588
Forks
83
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MiniMax-AI/MiniMax-M2.5

All issues in MiniMax-AI/MiniMax-M2.5

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.