[M3 Bug] Anthropic-compatible route returns empty content array with stop_reason end_turn on agentic turns
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- api
Rechercherichtung
This is a provider-side behaviour report about POST https://api.minimax.io/anthropic/v1/messages, not an edit in a source tree, so start by reading it alongside #39, #30, #9, #28 and #10 to see whether the empty-turn and thinking-only shapes share a cause. The concrete evidence to work from is the three thinking variants and the output_tokens / stop_reason pairs in the tables; whoever triages it should try to capture a failing request on this route with the same thinking settings. Done here means an answer to the four questions in the Ask section (intentional shape or bug, reasoning bound, recommended thinking mode, safe max_tokens), not a patch.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
On the Anthropic-compatible endpoint (POST https://api.minimax.io/anthropic/v1/messages), MiniMax-M3 intermittently ends an assistant turn without any content block, while still reporting output tokens:
{ "content": [], "stop_reason": "end_turn", "usage": { "output_tokens": 331 } }
A client sees an assistant message with zero blocks — no text, no tool_use, no thinking — so nothing is rendered and the user has to re-prompt ("continue") to make progress. The same endpoint also sometimes returns a turn that contains only a thinking block and no text.
Both shapes are visible in the wild on agentic (tool-calling) workloads and appear to correlate with the thinking setting:
| thinking | observed turn shapes |
|---|---|
| omitted | content: [] + end_turn (empty turn) |
{"type":"disabled"} |
content: [] + end_turn (empty turn) |
{"type":"adaptive"} |
thinking block only, no text (turn ends mid-plan) |
This is the same behaviour OpenClaw hit; they worked around it by pinning M3 to the omitted/adaptive thinking path because "M3 emits proper Anthropic thinking blocks and returns an empty content array with stop_reason: "end_turn" when thinking is disabled" (openclaw@443ac73, openclaw@962618f). As far as I can tell this has not been filed here with measured data.
Environment
- Model:
MiniMax-M3 - Endpoint:
https://api.minimax.io/anthropic/v1/messages(Anthropic Messages compatible), Token Plan plan - Client: opencode v2.3.0 (
@opencode/ai/providers/minimax/messages, Anthropic Messages protocol) - OS: Linux 6.8.0-149-generic (x64), install channel
latest - Thinking: varied per variant — omitted /
{"type":"disabled"}/{"type":"adaptive"}(nobudget_tokens, noreasoning_effort, nooutput_config.effortare sent) - Workload: long agentic sessions (100k–290k cached context) with tools and multi-step edits
Reproduction
Intermittent — not reproducible with a short synthetic conversation (12/12 clean requests succeeded). It shows up on long, tool-heavy sessions. The client-side signature is deterministic and easy to detect:
- Run an agentic session against
MiniMax-M3on the Anthropic-compatible route. - Inspect the stored assistant messages; some have zero content blocks while
usage.output_tokens > 0:
{
"model": { "id": "MiniMax-M3", "providerID": "minimax-coding-plan", "variant": "thinking" },
"finish": "stop",
"rawFinish": "end_turn",
"content": [],
"tokens": { "input": 51, "output": 331, "reasoning": 0, "cache": { "read": 218368, "write": 0 } }
}
- In the UI the turn renders as nothing at all (no text, no tool call, no "Thinking" block) even though the provider consumed ~330–1280 output tokens.
Expected Behavior
Every assistant turn should contain at least one usable block (text or tool_use), or the response should carry a stop_reason that says why it stopped (max_tokens, pause_turn, ...). An empty content array with stop_reason: "end_turn" and non-zero output_tokens is indistinguishable from a no-op for the client.
Actual Behavior
Measured over 44,005 assistant turns in 30 days of real sessions on this route:
| thinking variant | turns | empty (content: []) |
thinking-only (no text) |
|---|---|---|---|
adaptive |
41,988 | 101 | 74 |
| omitted | 1,978 | 3 | 0 |
disabled |
39 | 3 | 0 |
Representative empty turns (client-side record): output_tokens 331 / 680 / 1057 / 1280 / 329, stop_reason: "end_turn", content: [], and no firstToken event — i.e. not a single content delta ever reached the client.
The thinking-only turns end mid-plan, with the reasoning visibly truncated at the point where the model was about to act, e.g.:
"Let me continue: remove the dead CSS and unify the badge component. Dead CSS to remove:
1. `Card`: `.empty`, `.empty__icon` ...
…followed by end_turn and no text/tool_use block.
Additional Context
What we ruled out
- Not a timeout: the failing turns complete in 3.7–14 s; the provider answers, it just answers with nothing.
- Not a quota / rate-limit error: no
Token Plan usage limit reachedor 429 on those turns; HTTP 200 withstop_reason: end_turn. - Not a context-size issue: reproduced clean at 15k and 77k cached tokens (6/6 requests fine), and the failures happen at 200k+ cached context — the threshold is not reproducible in isolation, but the failure is not explained by length alone.
- Not client-side parsing: the provider's own response carries
content: []— there is no block for the client to drop. The same request shape succeeds on the same client moments later. - Not an "assistant turn with empty content" poison: replaying a conversation whose previous assistant message had
content: []returns a normal answer (2/2 for each shape).
Max tokens: per your docs, "thinking tokens count toward [max_tokens] too, so a value that is too small yields stop_reason: "max_tokens" with no text output", and the recommended value for M3 is 131072. On this route the client sends no thinking.budget_tokens and no output_config.effort, and the Anthropic-compatible schema for M3 only accepts thinking.type = disabled | adaptive — so there is no client-side knob to bound M3's reasoning, unlike MiniMax-M3.1-Flash which exposes output_config.effort. With adaptive thinking, M3 can spend a large fraction of the output budget on reasoning alone; on the observed empty turns the model still had plenty of budget left, which suggests the turn is closed by the model rather than by the limit.
Related issues
- #39 — non-convergent tool loop, 115/116 turns ending in
tool_calls, 0 final answers (same route, thinking enabled, no budget) - #30 — "M3 stops doing its job suddenly" (stops mid-announcement, needs a new prompt)
- #9 — "M3 Response cycle often stopped abruptly with abnormal message" (reported from opencode)
- #28 — answer tokens emitted before closing
</think>, answer truncated after stripping reasoning - #10 — with
thinking.type=disabled, planning text leaks into the visibletextchannel
Ask
- Is the empty
contentarray withstop_reason: "end_turn"(and non-zerooutput_tokens) an intentional response shape for M3, or a bug on the Anthropic-compatible route? - Is there a supported way to bound M3's thinking on this route (an equivalent of
output_config.effortfor M3.1-Flash), so that the reasoning budget cannot crowd out the answer? - For agentic workloads on M3, do you recommend
adaptiveordisabled, and is there an intended cap on the reasoning tokens per turn? - Would it be safe for clients to send
max_tokens: 131072(your recommended value) on this route, and does the thinking budget then stay bounded?
- 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 ·
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 18/100
MiniMax-AI/MiniMax-M3#41 · 1 Kommentar ·
-
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