[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 18/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Domaine
- api
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
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.
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 505
- Forks
- 59
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de MiniMax-AI/MiniMax-M3
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
MiniMax-AI/MiniMax-M3#34 · 1 réaction ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 28/100
MiniMax-AI/MiniMax-M3#36 · 2 réactions ·
Toutes les issues de MiniMax-AI/MiniMax-M3
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
grafana/viz-contract#151 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
erigontech/erigon#27233 ·
Les mainteneurs répondent en général sous 1 jour
-
integration: matter
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
home-assistant/core#196219 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
area:api p2 product:business triage:active type:feat
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
cuadrao-ai/argus#2656 ·
Les mainteneurs répondent en général sous 1 jour