[M3 Bug] Anthropic-compatible stream delivers final input_json_delta after content_block_stop, truncating tool arguments
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 18/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- api
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Sem dados de linguagem
- Estrelas
- 505
- Forks
- 59
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de MiniMax-AI/MiniMax-M3
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
MiniMax-AI/MiniMax-M3#34 · 1 reação ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 18/100
MiniMax-AI/MiniMax-M3#40 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
MiniMax-AI/MiniMax-M3#39 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
MiniMax-AI/MiniMax-M3#37 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 28/100
MiniMax-AI/MiniMax-M3#36 · 2 reações ·
Todas as issues de MiniMax-AI/MiniMax-M3
Issues semelhantes
-
? - Needs Triage bot_watch bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA/cudf-spark-jni#5594 ·
Mantenedores costumam responder em até 1 dia
-
feature-request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
open-telemetry/opentelemetry-python#5994 ·
Mantenedores costumam responder em até 2 dias
-
area:model Rollout vdr
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
NVIDIA-NeMo/Gym#7190 ·
Mantenedores costumam responder em até 2 dias
-
Bug: CaseInsensitiveDict (event.headers) returns True for both == and != against the same mappingAbertabug triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
aws-powertools/powertools-lambda-python#8948 ·
Mantenedores costumam responder em até 1 dia
-
bug feature: previews and thumbnails performance 🚀
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia