[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- api
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 505
- Forks
- 59
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MiniMax-AI/MiniMax-M3
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
MiniMax-AI/MiniMax-M3#34 · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
MiniMax-AI/MiniMax-M3#36 · 2 reacciones ·
Todos los issues de MiniMax-AI/MiniMax-M3
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
dsavransky/EXOSIMS#497 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dginev/latexml-oxide#1132 ·
Los mantenedores suelen responder en 1 día
-
BoolType values: only the first byte of the 32-bit value is tested (e.g. 00 00 01 00 → False)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
EricZimmerman/evtx#281 ·
-
bugfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 3 días
-
ClickHouse: quantile is read as the exact Quantile, though ClickHouse's quantile is approximateAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día