openclaw - 💡(How to fix) Fix [Bug]: "No text output returned" for Gemini Flash does not trigger configured fallback model

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…

When Gemini Flash returns an empty response (resulting in "No text output returned for provider \"google\" model \"gemini-2.5-flash\"") the configured fallback model is not attempted. The agent turn silently ends with no output delivered to the user.

Error Message

2026-05-12T09:50:15 [ERROR] Error: No text output returned for provider "google" model "gemini-2.5-flash".

Root Cause

From the user's perspective: the agent goes silent for an indefinite period. Because the Signal channel requires an inbound messageId to deliver outbound messages, subsequent valid responses queue up and arrive as a flood when the next inbound message triggers a new turn — causing chronologically incoherent message bursts.

Code Example

{
    "primary": "google/gemini-2.5-flash",
    "fallbacks": ["deepseek/deepseek-chat"]
  }

---

2026-05-12T09:50:15 [ERROR] Error: No text output returned for provider "google" model "gemini-2.5-flash".
RAW_BUFFERClick to expand / collapse

Summary

When Gemini Flash returns an empty response (resulting in "No text output returned for provider \"google\" model \"gemini-2.5-flash\"") the configured fallback model is not attempted. The agent turn silently ends with no output delivered to the user.

Environment

  • OpenClaw version: 2026.5.4
  • Agent model config:
    {
      "primary": "google/gemini-2.5-flash",
      "fallbacks": ["deepseek/deepseek-chat"]
    }
  • Channel: Signal (direct DM)

Steps to Reproduce

  1. Configure an agent with primary: google/gemini-2.5-flash and a fallback model.
  2. Send a message that results in Gemini Flash returning an empty/null text response (occurs intermittently under API load — appears to happen when thinking tokens are consumed but no output tokens are produced).
  3. Observe gateway log.

Expected Behavior

When primary fails with an empty output, OpenClaw should retry with the next model in fallbacks, same as it does for HTTP errors (503, rate limit, timeout).

Actual Behavior

The error is logged as ERROR but fallback is not triggered. The agent turn ends silently — no message is delivered to the user, no fallback attempt is visible in logs.

2026-05-12T09:50:15 [ERROR] Error: No text output returned for provider "google" model "gemini-2.5-flash".

No subsequent log entries for fallback attempt or DeepSeek inference. Session JSONL confirms the turn ended with no assistant message after the tool result that preceded the empty-output LLM call.

Impact

From the user's perspective: the agent goes silent for an indefinite period. Because the Signal channel requires an inbound messageId to deliver outbound messages, subsequent valid responses queue up and arrive as a flood when the next inbound message triggers a new turn — causing chronologically incoherent message bursts.

Notes

  • HTTP-level failures (503, fetch-timeout) correctly trigger fallback — observed in the same session with the image generation subsystem.
  • The "No text output" case appears specific to Gemini's thinking-mode returning thinking tokens but zero output tokens. This is distinct from a network/auth failure and may need to be explicitly classified as a retryable provider error.

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

openclaw - 💡(How to fix) Fix [Bug]: "No text output returned" for Gemini Flash does not trigger configured fallback model