[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 18/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- api
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 505
- Fork
- 59
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MiniMax-AI/MiniMax-M3
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
MiniMax-AI/MiniMax-M3#34 · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
MiniMax-AI/MiniMax-M3#36 · 2 reaction ·
Tất cả issue của MiniMax-AI/MiniMax-M3
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
dsavransky/EXOSIMS#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
dginev/latexml-oxide#1132 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BoolType values: only the first byte of the 32-bit value is tested (e.g. 00 00 01 00 → False)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EricZimmerman/evtx#281 ·
-
bugfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 3 ngày
-
ClickHouse: quantile is read as the exact Quantile, though ClickHouse's quantile is approximateĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày