[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- api
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- No language data
- Stars
- 505
- Forks
- 59
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MiniMax-AI/MiniMax-M3
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
MiniMax-AI/MiniMax-M3#34 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
MiniMax-AI/MiniMax-M3#36 · 2 reactions ·
All issues in MiniMax-AI/MiniMax-M3
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ricktaylor/hardy#881 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
tashfeenahmed/freellmapi#2217 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 18 days