#10430: fix: remove Minimax from isReasoningTagProvider
stale
Cluster:
Model Reasoning Fixes
## Summary
- Remove Minimax from `isReasoningTagProvider()` in `provider-utils.ts`
- Minimax M2.1 uses the Anthropic-compatible messages API with structured `thinking` content blocks (same as Claude), so it does **not** need tag-based reasoning wrapping (`<think>`/`<final>`)
## Problem
When Minimax is classified as a "reasoning tag provider", `enforceFinalTag` is set to `true`. This causes `stripBlockTags()` to run in strict mode, only returning text that appears inside `<final>` blocks.
However, Minimax M2.1 sends its thinking as structured content blocks via the Anthropic API (not as `<think>` text tags), and does **not** wrap its text output in `<final>` tags. The strict mode therefore returns an empty string for all streaming text, resulting in:
- **TUI (WebSocket)**: No output — `emitAgentEvent` is never called, the chat delta buffer remains empty, and `emitChatFinal` sends `message: undefined`
- **Telegram (`streamMode: "partial"`)**: Unaffected — bypasses the streaming event pipeline via `onPartialReply`
- **Session storage**: Unaffected — `handleMessageEnd()` extracts text directly from the complete message object
## Root cause analysis
1. `isReasoningTagProvider("minimax")` → `true` (provider-utils.ts:24)
2. `resolveEnforceFinalTag()` → `enforceFinalTag: true`
3. `stripBlockTags()` strict mode: only returns text inside `<final>` blocks; returns `""` if no `<final>` tag is ever seen
4. Minimax text has no `<final>` tags → `stripBlockTags` returns `""` → no streaming emit → empty buffer → TUI shows nothing
## Test plan
- [x] Verified with Minimax M2.1 + TUI: streaming output now displays correctly
- [x] TypeScript build passes (`tsdown` — 142 files)
- [ ] Regression: Claude models should continue working normally (they use native thinking blocks and are not affected by `isReasoningTagProvider`)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
- Updates `isReasoningTagProvider()` to stop treating Minimax as a tag-wrapped reasoning provider.
- Leaves Google/Gemini/Ollama and `google-antigravity/*` behavior unchanged.
- Intended effect is to avoid strict `<final>`-only stripping for Minimax streams so TUI/WebSocket streaming can display text normally.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is narrowly scoped to a single provider classification helper and only removes Minimax from the tag-based reasoning list; other providers and call sites unchanged. No compile/runtime hazards were introduced in the touched code.
- src/utils/provider-utils.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#17455: fix: strip content before orphan closing think tags
by jwt625 · 2026-02-15
76.5%
#13006: fix(provider): disable reasoning tags for gemini-3-pro variants to ...
by whyuds · 2026-02-10
75.8%
#6678: fix(agents): support thinking tags with attributes
by GHesericsu · 2026-02-01
75.7%
#6559: Fix LiteLLM reasoning-tag handling + fallback to <think> content
by Najia-afk · 2026-02-01
75.4%
#17304: feat(gemini): robust handling for non-XML reasoning headers (`Think...
by YoshiaKefasu · 2026-02-15
75.1%
#18935: fix(agents): suppress reasoning blocks from channel delivery
by BinHPdev · 2026-02-17
74.9%
#11876: fix(ollama): don't auto-enable enforceFinalTag for Ollama models
by Nina-VanKhan · 2026-02-08
74.5%
#6685: fix: suppress thinking leak for Synthetic reasoning models
by AkiLetschne · 2026-02-01
74.4%
#16733: fix(ui): avoid injected newlines when tool output is hidden
by jp117 · 2026-02-15
73.7%
#3678: TUI: fix /reasoning by supporting stream + normalization-Mark as AI...
by AaronWander · 2026-01-29
73.6%