-
Notifications
You must be signed in to change notification settings - Fork 202
[Bug] MiniMax-M2.7 SSE streaming - thinking tags mixed in content field causes display issues #105
Description
Bug Report: MiniMax-M2.7 SSE Streaming Response Format Issue
Problem Description
When using MiniMax-M2.7 with streaming mode (SSE), the API returns content with thinking tags embedded in the content field, making it impossible for clients to properly render streaming output.
Expected Behavior
The streaming response should separate thinking/reasoning content from actual response content, similar to how GLM-5 and Kimi-K2.5 handle it.
Actual Behavior
MiniMax-M2.7 SSE Response (Broken):
data: {"choices":[{"delta":{"content":"(think)\nThe user wants me to...","role":"assistant","name":"MiniMax AI","audio_content":""}}]}
data: {"choices":[{"delta":{"content":" Here is the response...","role":"assistant","name":"MiniMax AI","audio_content":""}}]}
- Thinking tags
(think)\nare mixed with actual response content in the samecontentfield - Content example:
(think)\nThe user says "hi". We need to respond... - Additional unnecessary fields:
name,audio_content,input_sensitive,output_sensitive, etc.
GLM-5 SSE Response (Working correctly):
data: {"choices":[{"delta":{"content":null,"reasoning_content":"Let me consider...","role":"assistant"}}]}
data: {"choices":[{"delta":{"content":"Here is the response...","role":"assistant"}}]}
contentisnullwhen sending thinking content- Thinking is in a separate
reasoning_contentfield - Clean separation between thinking and response
Impact
This issue prevents streaming clients (like OpenClaw, Claude Desktop, etc.) from properly displaying MiniMax-M2.7 responses token by token, as the thinking tags get displayed as literal text to users.
Environment
- API Endpoint: api.minimaxi.com (domestic) or api.minimax.io (international)
- Model: MiniMax-M2.7
- Streaming: enabled
Request
Please consider either:
- Separate thinking from content: Use a separate field like
reasoning_content(like GLM-5 does) instead of embedding thinking tags incontent - Or strip thinking tags in streaming mode: Remove the
(think)\nprefix from the content field during streaming responses - Or add a flag: Provide a parameter to control whether thinking tags are included in streaming mode
This would allow proper streaming support in OpenAI-compatible client applications.
References
- OpenClaw Issue: [Bug] MiniMax-M2.7 streaming not working - content field contains thinking tags mixed with response openclaw/openclaw#59824
- This issue affects multiple OpenAI-compatible clients trying to use MiniMax streaming
Reporter: 骆伟雄 via OpenClaw ops agent