Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[minimax M3 Bug] Bug Report: Raw internal tool-call tokens (]<]minimax[>[) leaking into minimax-m3 response content with stop chat

未关闭
#31 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
冷清
技术栈
openapi
领域
ai, api

调研方向

首先通过 /v1/chat/completions 端点,使用 minimax-m3 模型和工具 schema,在流式和非流式请求下复现该问题。将成功响应与 message.content 中出现 ]<]minimax>[ 的情况进行比较。完成标准是:工具调用始终在结构化的 tool_calls 字段中返回,或者格式错误的 payload 产生明确且可检测的错误,而不是返回包含原始 token 的 200 响应。

由索引模型根据 Issue 内容生成。

描述

bug
Which inference path did you use?

Other

Inference parameters

No response

Prompt / input
leaking into minimax-m3 response content
Expected behavior

Bug Report: Raw internal tool-call tokens (]<]minimax[>[) leaking into minimax-m3 response content

Actual behavior

when i coding with minimax m3 some times got this and stop chat , some times got continuously
minimax m3 ai:
Let me read that part to confirm.
I need to continue with Step 1. Let me read the run_one function to find where to add the state initialization Tuner.]<]minimax[>[<tool_call>
]<]minimax[>[]<]minimax[>[C:\encher\src\main.rs]<]minimax[>[]<]minimax[>[<start_line>130]<]minimax[>[</start_line>]<]minimax[>[<end_line>165]<]minimax[>[</end_line>]<]minimax[>[
]<]minimax[>[</tool_call>

Additional context

##################
i ask with it claude , say:

Bug Report (from claude): Raw internal tool-call tokens (]<]minimax[>[) leaking into minimax-m3 response content (


Summary

When using the minimax-m3 model through the Kilo Gateway / Kimchi API (OpenAI-compatible chat/completions endpoint), the model's internal tool-call boundary tokens (]<]minimax[>[) sometimes leak directly into the visible message.content field instead of being parsed into a proper structured tool_calls array. This produces garbled, unusable output on the client side and causes the calling application (an AI coding agent) to stall or fail mid-task.

Environment

  • Model: minimax-m3 (accessed as kimchi/minimax-m3 via Kilo Gateway)
  • Endpoint: /v1/chat/completions (OpenAI-compatible), both streaming and non-streaming
  • Client: OpenAI-compatible coding agent (opencode), via a local proxy that otherwise forwards requests unmodified
  • Frequency: Intermittent — occurs "suddenly" and sometimes repeats for multiple consecutive requests before stopping

Expected behavior

When the model wants to invoke a tool/function, the response should contain a properly structured tool_calls array:

{
  "choices": [{
    "message": {
      "role": "assistant",
      "content": null,
      "tool_calls": [{
        "id": "call_...",
        "type": "function",
        "function": { "name": "...", "arguments": "{...}" }
      }]
    }
  }]
}

Actual behavior

The model's raw internal boundary/delimiter tokens appear directly in message.content as plain text, wrapping what looks like an internal tool-call payload that was never converted into the structured format.

Reproduction examples (captured from live responses)

Example:

Debug derive conflict (BlendMode already has Debug). Fix:]<]minimax[>[ ]<]minimax[>[]<]minimax[>[C:\Users\yumin\Desktop\other\no\cons\tun\src\lib.rs]<]minimax[>[]<]minimax[>[/// Selected configuration for one scene.
#[derive(Debug, Clone, Copy, Debug)]
pub struct ConfigChoice { ... }
]<]minimax[>[]<]minimax[>[cargo test --release --manifest-path "..." --lib 2>&1 | grep -E "(test result|FAILED|error)" | head -10]<]minimax[>[]<]minimax[><]minimax[>[]<]minimax[>[

Observations

  1. The ]<]minimax[>[ sequence appears to function as an internal delimiter marking the boundaries of a tool call (target file path, code diff/content, and a shell command each appear as separate segments between markers).
  2. In Example 1, the payload between markers matches the shape of a code-edit tool call: file path → old/new code content → a test command → a numeric value (possibly a timeout in ms).
  3. This occurs on both streaming and non-streaming requests.
  4. Client-side retries of the same request sometimes succeed with a properly formatted tool_calls response, suggesting this is non-deterministic / load- or path-dependent on the gateway or model-serving side rather than a fixed per-request issue.

Impact

  • Any client relying on structured tool_calls (coding agents, function-calling integrations) receives unusable output and cannot execute the intended action.
  • Silent failures: there is no error status/code returned — the response is 200 OK with malformed content, so clients that don't specifically pattern-match for this can't distinguish it from a legitimate (if unusual) text response.

Suggested fix directions

  • Ensure the tool-call parsing/finalization step on the gateway (or model-serving layer) always converts these internal delimiter-wrapped segments into the structured tool_calls field before returning the response, for both streaming and non-streaming paths.
  • If the delimiter tokens are ever unparseable for some segments, return an explicit error (e.g. finish_reason: "content_filter" or a 5xx) rather than 200 OK with raw tokens in content, so clients can detect and retry deterministically instead of silently receiving garbage.
  • Investigate why this is intermittent — whether it correlates with specific prompt/tool-schema shapes, concurrent load, or a specific upstream replica/version of minimax-m3.
主要语言
没有语言数据
星标
487
派生
59
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MiniMax-AI/MiniMax-M3 的其他 Issue

查看 MiniMax-AI/MiniMax-M3 的全部 Issue

相似的 Issue

更多 AI Infra & Agents Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。