Skip to content

[Bug]: OpenClaw expects content but Ollama reasoning models sends empty fieldΒ #27806

Description

@xeonai44

Summary

🎯 Found It: glm-4.7-flash Outputs reasoning Field β€” OpenClaw Expects content

Your tests reveal the critical difference:
Model | Streaming Chunk Format -- | -- βœ… llama3.2 | "delta":{"role":"assistant","content":"Hello"} ❌ glm-4.7-flash | "delta":{"role":"assistant","content":"","reasoning":"Let"}
The problem: OpenClaw expects the standard OpenAI format where delta.content contains the response text. When glm-4.7-flash sends chunks with empty content and a reasoning field instead, OpenClaw likely:
  1. πŸ”„ Waits for content that never arrives in early chunks β†’ timeout
  2. 🧩 Fails to parse the unexpected reasoning field β†’ JSON/schema error
  3. 🚫 Treats empty content as "no response" β†’ fetch failed
This is why curl works (it just prints raw SSE) but OpenClaw fails (it tries to parse and act on the response).

Steps to reproduce

Use Ollama reasoning models like glm-4.7-flash
OpenClaw never responds
If llama3.2 is used, OpenClaw responds

Expected behavior

OpenClaw responds

Actual behavior

OpenClaw fails to respond

OpenClaw version

2026.2.25

Operating system

Ubuntu 24.04

Install method

No response

Logs, screenshots, and evidence

Impact and severity

Cannot use Ollama reasoning local models

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstaleMarked as stale due to inactivity

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions