Skip to content

[Bug]: Mistral reasoning (/think) crashes channel with [object object] due to missing stream wrapper #67192

@feline-fish

Description

@feline-fish

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

When using mistral/mistral-small-latest with reasoning enabled, the channel crashes and outputs [object Object] due to a missing stream wrapper for Mistral's reasoning_content in provider-stream-DWz9gckH.js

Steps to reproduce

  1. Run OpenClaw 2026.4.14.
  2. Set primary model to mistral/mistral-small-latest.
  3. In any channel (e.g., Telegram), send /think high.
  4. Send any prompt.
  5. Observe [object Object] in the channel and a timeout/NO_REPLY error in the gateway logs.

Expected behavior

OpenClaw should include a mistral-thinking stream wrapper in provider-stream-DWz9gckH.js (similar to the Moonshot pattern) that intercepts Mistral's reasoning_content or block array and emits standard type: "think" and type: "text" events to the pipeline

Actual behavior

The response stream parsing is missing for Mistral. JavaScript coerces the JSON object into a string ([object Object]), breaking the chat UI, permanently corrupting the session state, and outputting NO_REPLY[object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object]NO_REPLY

OpenClaw version

2026.4.14

Operating system

Linux (ARM64 / Raspberry Pi)

Install method

No response

Model

mistral/mistral-small-latest

Provider / routing chain

openclaw -> mistral

Additional provider/model setup details

Reasoning enabled via /think high.

Logs, screenshots, and evidence

Root Cause Analysis from source code:
1. Request Mapping is present: In api-D5-XMQ4r.js, MISTRAL_SMALL_LATEST_REASONING_EFFORT_MAP is present and sets supportsReasoningEffort: true
2. Missing Stream Wrapper: In provider-stream-DWz9gckH.js, there are wrappers for other reasoning models (createGoogleThinkingPayloadWrapper, createMoonshotThinkingWrapper) but NO createMistralThinkingWrapper
3. Mistral's API returns an array of blocks ([{type: "thinking"}, {type: "text"}]) or a JSON object with reasoning_content during a stream, which causes the crash because there is no handler

Impact and severity

Affected: All users on Telegram (and likely other channels) using Mistral with reasoning
Severity: High (permanently corrupts the session state until the gateway is restarted and the sessions.json is wiped)
Frequency: 100% reproducible when Mistral reasoning is enabled
Consequence: Users cannot use Mistral reasoning without breaking their instances

Additional information

Workaround for affected users: Stop the openclaw-gateway service, delete ~/.openclaw/agents/main/sessions/sessions.json, and restart the service

Related Issues (This seems to be part of a broader pattern regarding stream-parsing for reasoning features):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:crashProcess/app exits unexpectedly or hangs

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions