openclaw - ✅(Solved) Fix [Bug] stepfun/step-3.5-flash: thinking content leaks to channel because reasoning cannot be disabled [1 pull requests, 7 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59826Fetched 2026-04-08 02:40:04
View on GitHub
Comments
7
Participants
2
Timeline
13
Reactions
0
Author
Participants
Timeline (top)
commented ×7cross-referenced ×2mentioned ×2subscribed ×2

Root Cause

Root Cause: Step 3.5 Flash requires reasoning: true to be enabled in the model config (the endpoint rejects requests with reasoning disabled — see #59186). However, the model returns thinking content inline in the text/content field rather than in a separate reasoning_content field, similar to the MiniMax M2.7 issue described in #55809. OpenClaw's streaming handler does not strip this thinking content, so it appears directly in the channel.

Fix Action

Fix / Workaround

  • This is distinct from the MiniMax issue in that Step 3.5 Flash cannot disable reasoning at the API level, so the workaround of setting reasoning: false is not available
  • The fix pattern from #55809 (disabling thinking at the Anthropic-messages payload level) may need to be extended to cover stepfun provider models as well

PR fix notes

PR #12: fix: require openclaw >= 2026.4.2 (fixes #59826 thinking leak)

Description (problem / solution / changelog)

Summary

lossless-claw-enhanced bundles openclaw 2026.2.17 which ignores thinking_* events from openai-completions providers. This causes stepfun's thinking content to leak into the channel text stream.

openclaw 2026.4.2 includes the proper fix for thinking event handling (added thinking_* event handling in handleMessageUpdate).

Fix

Update peerDependencies.openclaw from "*" to ">=2026.4.2".

Testing

  • Local patch to bundled node_modules/openclaw/dist/plugin-sdk/reply-BKdTPI2b.js verified fix works
  • 5 consecutive tests on step-3.5-flash with reasoning both true/false: no thinking leak

Related

  • openclaw/openclaw#59826

Changed files

  • package-lock.json (modified, +2157/-4439)
  • package.json (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

Bug Description

When using stepfun/step-3.5-flash, the model's internal thinking/reasoning content leaks into user-visible chat output.

Root Cause: Step 3.5 Flash requires reasoning: true to be enabled in the model config (the endpoint rejects requests with reasoning disabled — see #59186). However, the model returns thinking content inline in the text/content field rather than in a separate reasoning_content field, similar to the MiniMax M2.7 issue described in #55809. OpenClaw's streaming handler does not strip this thinking content, so it appears directly in the channel.

Environment

  • OpenClaw version: 2026.4.1
  • Channel: Feishu
  • Model: stepfun/step-3.5-flash

Steps to Reproduce

  1. Configure stepfun provider with step-3.5-flash model
  2. Ensure reasoning: true is set (required — cannot be disabled)
  3. Send any message to the agent
  4. Observe: thinking/reasoning content appears in the reply alongside actual response text

Expected Behavior

Thinking content should be filtered out and not visible to the user. Only the final response should appear.

Actual Behavior

Internal thinking/reasoning content is visible in the chat, mixed with the actual response.

Related Issues

  • #55809: Similar issue for MiniMax M2.7 (fix committed but not yet released)
  • #59186: stepfun/step-3.5-flash returns 401 / reasoning required
  • #47913: Thinking content leaks into text for MiniMax/Kimi
  • #40736: Thinking content leaks to channel even when thinking is disabled

Notes

  • This is distinct from the MiniMax issue in that Step 3.5 Flash cannot disable reasoning at the API level, so the workaround of setting reasoning: false is not available
  • The fix pattern from #55809 (disabling thinking at the Anthropic-messages payload level) may need to be extended to cover stepfun provider models as well

extent analysis

TL;DR

Modify the OpenClaw streaming handler to strip thinking content from the model's response.

Guidance

  • Identify the specific field in the model's response that contains the thinking content (e.g., text/content field) and modify the streaming handler to filter it out.
  • Review the fix pattern from #55809 and adapt it to work with the stepfun provider models, as the reasoning cannot be disabled at the API level.
  • Consider adding a separate reasoning_content field to the model's response, similar to the MiniMax M2.7 issue, to make it easier to filter out the thinking content.
  • Verify that the modified streaming handler correctly filters out the thinking content and only displays the actual response text to the user.

Example

No code example is provided as the issue does not contain sufficient information about the specific implementation details.

Notes

The fix may require modifications to the OpenClaw streaming handler and potentially the stepfun provider models. The solution may not be applicable if the model's response format changes or if new fields are added that contain thinking content.

Recommendation

Apply a workaround by modifying the OpenClaw streaming handler to filter out the thinking content, as upgrading to a fixed version is not mentioned in the issue. This workaround is necessary because the reasoning cannot be disabled at the API level for the stepfun/step-3.5-flash model.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING