openclaw - 💡(How to fix) Fix [Bug]: Ollama cloud models (gemini-3-flash-preview:cloud, deepseek-v4-pro:cloud) fail with "Assistant turn failed before producing content" or silent fallback [2 comments, 3 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#73909Fetched 2026-04-29 06:13:23
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2closed ×1

Two Ollama cloud models that work perfectly via direct Ollama API call fail when used through OpenClaw:

  1. ollama/gemini-3-flash-preview:cloud → "Assistant turn failed before producing content"
  2. ollama/depseek-v4-pro:cloud → Silent fallback to next model in chain Both models work fine when called directly via curl http://localhost:11434/api/generate.

Error Message

  1. Observe error: "Assistant turn failed before producing content"
  • gemini-3-flash-preview:cloud: Error message "Assistant turn failed before producing content"

Root Cause

Two Ollama cloud models that work perfectly via direct Ollama API call fail when used through OpenClaw:

  1. ollama/gemini-3-flash-preview:cloud → "Assistant turn failed before producing content"
  2. ollama/depseek-v4-pro:cloud → Silent fallback to next model in chain Both models work fine when called directly via curl http://localhost:11434/api/generate.

Code Example

Direct API verification
Copy
# Works fine - 24s response time
curl http://localhost:11434/api/generate -d '{
  "model": "deepseek-v4-pro:cloud",
  "prompt": "Write a Python hello world",
  "stream": false
}'
Configuration
Copy
{
  "model": {
    "fallbacks": [
      "ollama/qwen3.5:cloud",
      "ollama/glm-5.1:cloud",
      "ollama/depseek-v4-pro:cloud",
      "ollama/gemma4:31b-cloud",
      "ollama/gemini-3-flash-preview:cloud"
    ],
    "primary": "ollama/kimi-k2.6:cloud"
  }
}
Possible related issues
#64710Similar timeout issue with Ollama models (fixed in 2026.4.26 for local models, but cloud models may have different capability discovery)
#57626Model fallback cascades
Additional notes
Both models work perfectly in other software (e.g., Frigate for gemini)
The fallback chain correctly routes to kimi when these models fail
This appears to be an OpenClaw-specific compatibility issue, not an Ollama issue
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Two Ollama cloud models that work perfectly via direct Ollama API call fail when used through OpenClaw:

  1. ollama/gemini-3-flash-preview:cloud → "Assistant turn failed before producing content"
  2. ollama/depseek-v4-pro:cloud → Silent fallback to next model in chain Both models work fine when called directly via curl http://localhost:11434/api/generate.

Steps to reproduce

  1. Add ollama/gemini-3-flash-preview:cloud as primary or fallback model
  2. Send any message to trigger the model
  3. Observe error: "Assistant turn failed before producing content"
  4. OR for deepseek: Observe silent fallback to next model (kimi)

Expected behavior

Models should respond through OpenClaw just as they do via direct Ollama API calls.

Actual behavior

  • gemini-3-flash-preview:cloud: Error message "Assistant turn failed before producing content"
  • deepseek-v4-pro:cloud: Model silently falls back to next in chain (kimi-k2.6:cloud)

OpenClaw version

2026.4.26 (be8c246)

Operating system

OS: Linux 6.17.13-4-pve (Proxmox VM)

Install method

Node: v22.22.2 npm global

Model

Models affected: ollama/gemini-3-flash-preview:cloud ollama/depseek-v4-pro:cloud Working models (for comparison): ollama/kimi-k2.6:cloud ✅ ollama/qwen3.5:cloud ✅ ollama/glm-5.1:cloud ✅

Provider / routing chain

openclaw -> local ollama server -> ollama.com -> models

Additional provider/model setup details

Ollama version: Latest (deepseek-v4-pro:cloud pulled 2026-04-28) Models affected: ollama/gemini-3-flash-preview:cloud ollama/depseek-v4-pro:cloud Working models (for comparison): ollama/kimi-k2.6:cloud ✅ ollama/qwen3.5:cloud ✅ ollama/glm-5.1:cloud ✅

Logs, screenshots, and evidence

Direct API verification
Copy
# Works fine - 24s response time
curl http://localhost:11434/api/generate -d '{
  "model": "deepseek-v4-pro:cloud",
  "prompt": "Write a Python hello world",
  "stream": false
}'
Configuration
Copy
{
  "model": {
    "fallbacks": [
      "ollama/qwen3.5:cloud",
      "ollama/glm-5.1:cloud",
      "ollama/depseek-v4-pro:cloud",
      "ollama/gemma4:31b-cloud",
      "ollama/gemini-3-flash-preview:cloud"
    ],
    "primary": "ollama/kimi-k2.6:cloud"
  }
}
Possible related issues
#64710 — Similar timeout issue with Ollama models (fixed in 2026.4.26 for local models, but cloud models may have different capability discovery)
#57626 — Model fallback cascades
Additional notes
Both models work perfectly in other software (e.g., Frigate for gemini)
The fallback chain correctly routes to kimi when these models fail
This appears to be an OpenClaw-specific compatibility issue, not an Ollama issue

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Investigate and adjust the timeout settings or model configuration in OpenClaw to resolve the compatibility issue with ollama/gemini-3-flash-preview:cloud and ollama/depseek-v4-pro:cloud models.

Guidance

  • Review the OpenClaw configuration to ensure that the timeout settings are adequate for the cloud models, as the issue might be related to a timeout.
  • Verify that the model fallback chain is correctly configured to handle failures of the primary model.
  • Check the OpenClaw version and consider updating to a newer version if available, as the issue might be resolved in a later release.
  • Test the models with a different primary model to isolate if the issue is specific to the current primary model (ollama/kimi-k2.6:cloud).

Example

No specific code example is provided, as the issue seems to be related to configuration or compatibility rather than code.

Notes

The issue appears to be specific to OpenClaw and not a problem with the Ollama models themselves, as they work correctly when called directly via the API or in other software.

Recommendation

Apply a workaround by adjusting the timeout settings or model configuration in OpenClaw, as the root cause of the issue is likely related to compatibility or configuration rather than a bug that requires an upgrade.

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

Models should respond through OpenClaw just as they do via direct Ollama API calls.

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]: Ollama cloud models (gemini-3-flash-preview:cloud, deepseek-v4-pro:cloud) fail with "Assistant turn failed before producing content" or silent fallback [2 comments, 3 participants]