[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 18/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- api
调研方向
The payload names no repository file, test or entry point; the evidence is the SSE event order from POST https://api.minimax.io/anthropic/v1/messages, where the last input_json_delta arrives after content_block_stop. Start by capturing a streamed tool-use response and checking whether the ordering reproduces, then confirm which side owns the fix. Done means a reproduction showing whether every delta precedes its stop, or a maintainer reply assigning the work.
由索引模型根据 Issue 内容生成。
描述
Which inference path did you use?
MiniMax API
Inference parameters
No response
Prompt / input
-
Expected behavior
Actual behavior
Additional context
Summary
On the Anthropic-compatible endpoint (POST https://api.minimax.io/anthropic/v1/messages), the last
input_json_delta of a tool_use block is delivered after the block's content_block_stop.
Per the Anthropic SSE contract a client finalizes a tool call when it sees content_block_stop, so that
final delta is never applied. The argument text therefore stays truncated — in practice always missing
the closing } — and the arguments are no longer valid JSON.
Environment
- Endpoint:
POST https://api.minimax.io/anthropic/v1/messages - Model:
MiniMax-M3.1-Flash stream: true, tools enabled
Observed event order
content_block_start {"type":"tool_use","id":...,"name":"bash","input":{}}
content_block_delta {"delta":{"type":"input_json_delta","partial_json":"{\"command\":\"ls -la /tmp/ | head -50\""}}
content_block_stop {"type":"content_block_stop","index":1}
content_block_delta {"delta":{"type":"input_json_delta","partial_json":"}"}} <-- arrives too late
content_block_stop {"type":"content_block_stop","index":2}
Actual behavior
Tool-call arguments arrive truncated → JSON.parse fails → the call cannot be dispatched.
Measured over 8 consecutive streamed tool calls: 6 of 8 (75 %) truncated. It affects the last tool
call of an assistant turn in every observed case.
Expected behavior
All input_json_delta events for a block are delivered before its content_block_stop.
Additional context
content_block_stopis also emitted for block indices that never received acontent_block_start
(e.g.index: 3after blocks 0–2). Unclear whether that is intended.- The OpenAI-compatible endpoint (
POST https://api.minimax.io/v1/chat/completions) is unaffected:
there the closing}arrives beforefinish_reason.
- 主要语言
- 没有语言数据
- 星标
- 505
- 派生
- 59
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MiniMax-AI/MiniMax-M3 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
MiniMax-AI/MiniMax-M3#34 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
难度 4/5 3-5 天 新手友好度 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
难度 4/5 3-5 天 新手友好度 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
难度 5/5 一周以上 新手友好度 28/100
MiniMax-AI/MiniMax-M3#36 · 2 个 reaction ·
查看 MiniMax-AI/MiniMax-M3 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 86/100
dsavransky/EXOSIMS#497 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
dginev/latexml-oxide#1132 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
EricZimmerman/evtx#281 ·
-
bugfix
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复