openclaw - 💡(How to fix) Fix [Bug]: Empty responses from OpenAI-compatible models with reasoning

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…

Bug Report: Empty responses from OpenAI-compatible models with reasoning

I'm seeing empty responses ("⚠️ Agent couldn't generate a response") from self-hosted OpenAI-compatible models with reasoning enabled. Sessions run successfully on the backend but deliver nothing to the user.

Root cause:

Commit f66b1d1738 (May 10) — "fix: strip OpenAI-compatible replay reasoning" — changed reasoning stripping from Gemma4-only to ALL openai-completions models by default. Any model using openai-completions API now has historical reasoning blocks stripped on replay unless the provider explicitly opts out via dropReasoningFromHistory: false.

Commit e7277b4e3a (May 8) — "refactor(agents): preserve raw reasoning stream and push formatting to edge" — keeps reasoning deltas raw internally instead of pre-formatting them.

The interaction issue:

Models that output reasoning/thinking content in a raw format get their content mangled when replayed. The core sends the raw reasoning stream, but the replay sanitizer (via the new default) strips it. On some backends this causes the content block parser to fail — the model output gets placed entirely inside a thinking block instead of proper thinking + text separation. The result is an empty user-facing response.

Workaround:

Set "dropReasoningFromHistory": false in the provider config. This matches what DeepSeek and ZAI already do:

"my-provider": { "api": "openai-completions", "dropReasoningFromHistory": false, ... }

Suggested fix:

The blanket openai-completions default stripping is too broad. Either:

  1. Only apply dropReasoningFromHistory: true to models known to fail on replayed reasoning (e.g., Gemma 4), or
  2. Let individual provider plugins declare their own default instead of inheriting a universal one

Anyone else hitting empty responses from self-hosted reasoning models since the May releases?

Root Cause

Root cause:

Fix Action

Fix / Workaround

Workaround:

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Bug Report: Empty responses from OpenAI-compatible models with reasoning

I'm seeing empty responses ("⚠️ Agent couldn't generate a response") from self-hosted OpenAI-compatible models with reasoning enabled. Sessions run successfully on the backend but deliver nothing to the user.

Root cause:

Commit f66b1d1738 (May 10) — "fix: strip OpenAI-compatible replay reasoning" — changed reasoning stripping from Gemma4-only to ALL openai-completions models by default. Any model using openai-completions API now has historical reasoning blocks stripped on replay unless the provider explicitly opts out via dropReasoningFromHistory: false.

Commit e7277b4e3a (May 8) — "refactor(agents): preserve raw reasoning stream and push formatting to edge" — keeps reasoning deltas raw internally instead of pre-formatting them.

The interaction issue:

Models that output reasoning/thinking content in a raw format get their content mangled when replayed. The core sends the raw reasoning stream, but the replay sanitizer (via the new default) strips it. On some backends this causes the content block parser to fail — the model output gets placed entirely inside a thinking block instead of proper thinking + text separation. The result is an empty user-facing response.

Workaround:

Set "dropReasoningFromHistory": false in the provider config. This matches what DeepSeek and ZAI already do:

"my-provider": { "api": "openai-completions", "dropReasoningFromHistory": false, ... }

Suggested fix:

The blanket openai-completions default stripping is too broad. Either:

  1. Only apply dropReasoningFromHistory: true to models known to fail on replayed reasoning (e.g., Gemma 4), or
  2. Let individual provider plugins declare their own default instead of inheriting a universal one

Anyone else hitting empty responses from self-hosted reasoning models since the May releases?

Steps to reproduce

Models that output reasoning/thinking content in a raw format get their content mangled when replayed. The core sends the raw reasoning stream, but the replay sanitizer (via the new default) strips it. On some backends this causes the content block parser to fail — the model output gets placed entirely inside a thinking block instead of proper thinking + text separation. The result is an empty user-facing response.

Expected behavior

not an empty response.

Actual behavior

Agent couldn't generate a response. Note: some tool actions may have already been executed — please verify before retrying.

OpenClaw version

2026.5.7

Operating system

macos

Install method

npm

Model

kimi 2.6

Provider / routing chain

sglang

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

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…

FAQ

Expected behavior

not an empty response.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Empty responses from OpenAI-compatible models with reasoning