OpenClaw + Remote Ollama Fails: "does not support thinking" — But Direct API Works Fine
You've set up OpenClaw on one machine and Ollama on another machine on your local network. Direct curl calls to Ollama's /api/chat endpoint work perfectly. But when you run:
openclaw infer model run --model ollama/qwen2.5:0.5b --prompt "hello" --json
You get:
400 {"error":"\"qwen2.5:0.5b\" does not support thinking"}
No response in the OpenClaw gateway UI either. The model is working — OpenClaw is the problem.
What's Causing It
OpenClaw's Ollama adapter sends a "think": true flag in its requests by default when reasoning/thinking features are enabled globally in your config. Most small Ollama models — including qwen2.5:0.5b, qwen2.5:7b, and other quantized variants — don't support the thinking parameter and reject the request with a 400 error.
The frustrating part: when you call /api/chat directly with "think": false (or omit the field entirely), it works. OpenClaw is injecting a parameter the model can't handle.
Fix 1: Disable Thinking for the Ollama Provider in Config
In your openclaw.json, explicitly disable thinking for your Ollama models:
{
"models": {
"providers": {
"ollama": {
"baseUrl": "http://192.168.1.102:11434",
"models": [
{
"id": "qwen2.5:0.5b",
"thinkingDefault": "off",
"params": {
"think": false
}
}
]
}
}
}
}
Restart the gateway after saving:
openclaw gateway restart
Fix 2: Use the infer Command with Thinking Disabled
For one-off infer runs, pass thinking off explicitly:
openclaw infer model run \
--model ollama/qwen2.5:0.5b \
--prompt "Reply with exactly: hello" \
--reasoning off \
--json
Fix 3: Set a Global Default for Small Models
If you're running several small Ollama models that don't support thinking, set a provider-level default in your config:
{
"models": {
"providers": {
"ollama": {
"baseUrl": "http://192.168.1.102:11434",
"defaultParams": {
"think": false
}
}
}
}
}
This applies to all models under the Ollama provider unless overridden per-model.
Fix 4: Switch to a Thinking-Capable Ollama Model
If you actually want thinking/reasoning in your local model, use a model that supports it. Ollama models with native thinking support (as of April 2026):
qwq:32b— strong reasoning, requires ~20GB RAMdeepseek-r1:8b— lighter reasoning modelqwen3:8b— Qwen3 family with thinking support
ollama pull deepseek-r1:8b
# Then update your OpenClaw config to use deepseek-r1:8b
Two-Machine LAN Setup Tips
While you're fixing this, a few things to double-check for a reliable OpenClaw ↔ remote Ollama setup:
- Firewall: Port 11434 must be open on the Ollama machine. On Ubuntu:
sudo ufw allow 11434 - Ollama bind address: By default Ollama only listens on localhost. Set
OLLAMA_HOST=0.0.0.0in your Ollama service environment to allow LAN connections. - OpenClaw baseUrl: Use the LAN IP, not
localhost:"baseUrl": "http://192.168.1.102:11434"
Need help setting up a two-machine OpenClaw + Ollama deployment? ClawReady has done this setup dozens of times — we can get you running in under an hour.