Skip to content

[Bug] MiniMax-M2.7 SSE streaming - thinking tags mixed in content field causes display issues #105

@zcya198

Description

@zcya198

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)\n are mixed with actual response content in the same content field
  • 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"}}]}
  • content is null when sending thinking content
  • Thinking is in a separate reasoning_content field
  • 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:

  1. Separate thinking from content: Use a separate field like reasoning_content (like GLM-5 does) instead of embedding thinking tags in content
  2. Or strip thinking tags in streaming mode: Remove the (think)\n prefix from the content field during streaming responses
  3. 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


Reporter: 骆伟雄 via OpenClaw ops agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions