[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- api
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 505
- Forks
- 59
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus MiniMax-AI/MiniMax-M3
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
MiniMax-AI/MiniMax-M3#34 · 1 Reaktion ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 28/100
MiniMax-AI/MiniMax-M3#36 · 2 Reaktionen ·
Alle Issues in MiniMax-AI/MiniMax-M3
Ähnliche Issues
-
? - Needs Triage bot_watch bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NVIDIA/cudf-spark-jni#5594 ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature-request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
open-telemetry/opentelemetry-python#5994 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
area:model Rollout vdr
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
NVIDIA-NeMo/Gym#7190 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Bug: CaseInsensitiveDict (event.headers) returns True for both == and != against the same mappingOffenbug triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aws-powertools/powertools-lambda-python#8948 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug feature: previews and thumbnails performance 🚀
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag