Skip to content

Minimax: Text before tool calls not sent to chat #9983

Description

@Littlericket

Problem

When using Minimax model, text that appears before tool calls in a single API response is not being sent to the chat (e.g., WhatsApp). Only the tool block is shown.

Example

User: Check the time

Assistant: "Sure, let me check that." <-- NOT visible in WhatsApp
Assistant: [Tool: exec] <-- visible (tool block)
Assistant: "Done – it is 00:33..." <-- visible

Expected: All three parts should appear as separate messages in the chat.

Session Log Excerpt

The text IS visible in the session history/Dashboard UI:

{
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Sure, let me check that."
    },
    {
      "type": "toolCall",
      "id": "call_function_xxx_1",
      "name": "exec",
      "arguments": {
        "command": "date"
      }
    }
  ],
  "api": "anthropic-messages",
  "provider": "minimax",
  "model": "MiniMax-M2.1",
  "stopReason": "toolUse"
}

The Dashboard UI shows the text, but WhatsApp only receives the tool block.

Root Cause

The issue is that Minimax sends text + tool_call in a single API response. OpenClaw's reply pipeline only extracts the tool block, discarding the preceding text.

Compared to Claude/Sonnet which emit text before tools as separate events (e.g., text_delta, text_end before tool_execution_start), Minimax appears to bundle them together.

Observed Behavior

  • Text BEFORE tool calls: NOT sent to chat (visible in Dashboard only)
  • Tool results: Sent to chat
  • Text AFTER tool calls: Sent to chat

Location

The issue is in the Minimax provider integration, not in the general reply pipeline. The text never arrives as a separate event before tool_execution_start.

Environment

  • OpenClaw latest
  • Minimax model
  • WhatsApp channel

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions