openclaw - 💡(How to fix) Fix [Regression] OpenAI-compatible Gemini backend enters streaming mode but completes immediately with no incremental content updates (4.19 OK, 4.21+/4.22 broken) [1 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#70779Fetched 2026-04-24 05:53:44
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

After upgrading OpenClaw from 2026.4.19 to 2026.4.21 / 2026.4.22, streaming appears to regress for a custom OpenAI-compatible Gemini backend.

This does not look like a Feishu-only problem.

The same behavior is reproducible in:

  • Feishu private chat
  • OpenClaw Control UI

In both cases:

  • DeepSeek streams normally
  • GPT streams normally
  • only Gemini fails to stream incrementally

For Gemini, OpenClaw enters streaming mode, creates the card, then almost immediately transitions to completed, with no intermediate incremental content updates.

This worked on 2026.4.19.

Root Cause

So this is not caused by:

  • replyMode=static
  • renderMode=raw
  • block streaming being enabled

Fix Action

Fix / Workaround

2026-04-23T19:45:05.744Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:45:22.383Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:45:23.013Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:45:23.596Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:45:23.598Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:45:23.598Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:45:23.599Z info feishu/inbound/dispatch feishu[default][msg:...]: dispatch complete (replies=1, elapsed=17873ms)
2026-04-23T19:45:24.213Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=3, cardId=...)
2026-04-23T19:52:40.912Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:53:39.988Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:53:40.482Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:53:41.035Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:53:41.036Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:53:41.037Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:53:41.037Z info feishu/inbound/dispatch feishu[default][msg:...]: dispatch complete (replies=1, elapsed=60139ms)
2026-04-23T19:53:41.660Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=3, cardId=...)
2026-04-23T19:56:04.137Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:56:09.211Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:56:09.406Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:56:09.968Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:56:10.278Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=2, contentLen=103)
2026-04-23T19:56:10.480Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=3, contentLen=133)
2026-04-23T19:56:10.721Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=4, contentLen=156)
...
2026-04-23T19:56:17.329Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=32, contentLen=899)
2026-04-23T19:56:17.482Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:56:17.483Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:56:18.302Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=34, cardId=...)

Code Example

"channels": {
  "feishu": {
    "renderMode": "card",
    "replyMode": "streaming",
    "streaming": true,
    "blockStreaming": false
  }
}

---

2026-04-23T19:45:05.744Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:45:22.383Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:45:23.013Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:45:23.596Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:45:23.598Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:45:23.598Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:45:23.599Z info feishu/inbound/dispatch feishu[default][msg:...]: dispatch complete (replies=1, elapsed=17873ms)
2026-04-23T19:45:24.213Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=3, cardId=...)

---

2026-04-23T19:52:40.912Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:53:39.988Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:53:40.482Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:53:41.035Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:53:41.036Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:53:41.037Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:53:41.037Z info feishu/inbound/dispatch feishu[default][msg:...]: dispatch complete (replies=1, elapsed=60139ms)
2026-04-23T19:53:41.660Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=3, cardId=...)

---

2026-04-23T19:56:04.137Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:56:09.211Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:56:09.406Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:56:09.968Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:56:10.278Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=2, contentLen=103)
2026-04-23T19:56:10.480Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=3, contentLen=133)
2026-04-23T19:56:10.721Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=4, contentLen=156)
...
2026-04-23T19:56:17.329Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=32, contentLen=899)
2026-04-23T19:56:17.482Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:56:17.483Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:56:18.302Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=34, cardId=...)
RAW_BUFFERClick to expand / collapse

Regression: OpenAI-compatible Gemini backend enters streaming mode but completes immediately with no incremental content updates (4.19 OK, 4.21+/4.22 broken)

Summary

After upgrading OpenClaw from 2026.4.19 to 2026.4.21 / 2026.4.22, streaming appears to regress for a custom OpenAI-compatible Gemini backend.

This does not look like a Feishu-only problem.

The same behavior is reproducible in:

  • Feishu private chat
  • OpenClaw Control UI

In both cases:

  • DeepSeek streams normally
  • GPT streams normally
  • only Gemini fails to stream incrementally

For Gemini, OpenClaw enters streaming mode, creates the card, then almost immediately transitions to completed, with no intermediate incremental content updates.

This worked on 2026.4.19.

Environment

  • OpenClaw version:
    • works on 2026.4.19
    • broken on 2026.4.21
    • still broken on 2026.4.22
  • Channel:
    • Feishu private chat (p2p)
  • Also reproduced in:
    • OpenClaw Control UI
  • Feishu plugin:
    • @larksuite/openclaw-lark
  • Model backend types tested:
    • custom OpenAI-compatible Gemini backend → broken incremental streaming
    • DeepSeek → normal incremental streaming
    • GPT → normal incremental streaming

Why this does not appear to be a Feishu configuration issue

Current Feishu config is explicitly set to streaming mode:

"channels": {
  "feishu": {
    "renderMode": "card",
    "replyMode": "streaming",
    "streaming": true,
    "blockStreaming": false
  }
}

So this is not caused by:

  • replyMode=static
  • renderMode=raw
  • block streaming being enabled

Also, since DeepSeek and GPT stream normally through the same Feishu setup, the Feishu card rendering path itself seems fine.

Expected behavior

For Gemini via an OpenAI-compatible backend, OpenClaw should emit incremental streaming updates continuously, similar to DeepSeek / GPT:

  • create card
  • multiple incremental content updates
  • finalize card at the end

Actual behavior

For Gemini via an OpenAI-compatible backend:

  • OpenClaw resolves reply mode as streaming
  • card is created
  • then almost immediately transitions from streaming to completed
  • no intermediate content updates are sent

In UI terms, this looks like:

  • long wait
  • then final content appears almost all at once
  • no visible streaming

Reproduction

  1. Configure Feishu private chat with:
    • renderMode: "card"
    • replyMode: "streaming"
    • streaming: true
    • blockStreaming: false
  2. Set model to a custom OpenAI-compatible Gemini backend
  3. Send a long prompt that should clearly stream in many chunks
  4. Observe:
    • no incremental visible streaming in Feishu
    • same behavior also appears in Control UI
  5. Switch model to DeepSeek or GPT
  6. Observe:
    • incremental streaming works normally

Relevant logs

Broken case: Gemini backend

2026-04-23T19:45:05.744Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:45:22.383Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:45:23.013Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:45:23.596Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:45:23.598Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:45:23.598Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:45:23.599Z info feishu/inbound/dispatch feishu[default][msg:...]: dispatch complete (replies=1, elapsed=17873ms)
2026-04-23T19:45:24.213Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=3, cardId=...)

Another broken sample:

2026-04-23T19:52:40.912Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:53:39.988Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:53:40.482Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:53:41.035Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:53:41.036Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:53:41.037Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:53:41.037Z info feishu/inbound/dispatch feishu[default][msg:...]: dispatch complete (replies=1, elapsed=60139ms)
2026-04-23T19:53:41.660Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=3, cardId=...)

Key point:

  • there are no intermediate cardElement.content updates in the broken Gemini case

Working case: DeepSeek backend

With DeepSeek, streaming works as expected and emits many incremental content updates:

2026-04-23T19:56:04.137Z info feishu/card/reply-dispatcher feishu[default][msg:...]: reply mode resolved (effectiveReplyMode=streaming, replyMode=streaming, chatType=p2p)
2026-04-23T19:56:09.211Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=idle, to=creating, source=ensureCardCreated)
2026-04-23T19:56:09.406Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.create response (code=0, msg=success, context=cardId=...)
2026-04-23T19:56:09.968Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=creating, to=streaming, source=ensureCardCreated.cardkit)
2026-04-23T19:56:10.278Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=2, contentLen=103)
2026-04-23T19:56:10.480Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=3, contentLen=133)
2026-04-23T19:56:10.721Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=4, contentLen=156)
...
2026-04-23T19:56:17.329Z info feishu/card/cardkit feishu[default][msg:...]: cardkit cardElement.content response (code=0, msg=success, context=seq=32, contentLen=899)
2026-04-23T19:56:17.482Z info feishu/card/streaming feishu[default][msg:...]: phase transition (from=streaming, to=completed, source=onIdle, reason=normal)
2026-04-23T19:56:17.483Z info gateway/channels/feishu feishu[default]: dispatch complete (queuedFinal=true, replies=1)
2026-04-23T19:56:18.302Z info feishu/card/cardkit feishu[default][msg:...]: cardkit card.update response (code=0, msg=success, context=seq=34, cardId=...)

This is the expected behavior.

Additional notes / suspicion

This may be related to changes in the OpenAI-compatible streaming path between 2026.4.19 and 2026.4.21+, especially around:

  • streamed usage handling
  • final SSE chunk handling
  • stream_options.include_usage
  • compatibility with OpenAI-style Gemini backends

Because:

  • DeepSeek streams fine
  • GPT streams fine
  • only Gemini on a custom OpenAI-compatible backend regressed

What would help

I’d appreciate guidance on:

  • whether this is a known regression in OpenAI-compatible streaming
  • whether there was a change after 2026.4.19 affecting Gemini-compatible streaming behavior
  • whether there is a way to disable the specific streamed usage/final-chunk behavior as a workaround

extent analysis

TL;DR

The most likely fix for the regression in OpenAI-compatible Gemini backend streaming is to investigate and potentially revert changes related to streamed usage handling and final SSE chunk handling introduced between 2026.4.19 and 2026.4.21+.

Guidance

  1. Review changes: Examine the code changes between 2026.4.19 and 2026.4.21+ to identify potential regressions in the OpenAI-compatible streaming path.
  2. Streamed usage handling: Investigate how streamed usage is handled in the Gemini backend and compare it with the working DeepSeek and GPT backends.
  3. Final SSE chunk handling: Check how the final SSE chunk is handled in the Gemini backend and verify if it's compatible with OpenAI-style Gemini backends.
  4. Disable streamed usage: Explore the possibility of disabling the streamed usage or final-chunk behavior as a temporary workaround to isolate the issue.

Example

No specific code example is provided due to the lack of explicit code changes or APIs in the issue description.

Notes

The issue seems to be specific to the OpenAI-compatible Gemini backend, and the working cases (DeepSeek and GPT) suggest that the problem might be related to the changes in the streaming path. However, without more information about the code changes or the specific APIs used, it's challenging to provide a more detailed solution.

Recommendation

Apply a workaround by disabling the streamed usage or final-chunk behavior, if possible, to verify if it resolves the issue. This can help isolate the problem and provide more insight into the root cause.

FAIL-SAFE

If the issue lacks enough information, the safest approach is to review the code changes between 2026.4.19 and 2026.4.21+ and investigate the streamed usage handling and final SSE chunk handling in the Gemini backend.

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

For Gemini via an OpenAI-compatible backend, OpenClaw should emit incremental streaming updates continuously, similar to DeepSeek / GPT:

  • create card
  • multiple incremental content updates
  • finalize card at the end

Still need to ship something?

×6

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

Back to top recommendations

TRENDING