brash-grass-52323
06/10/2026, 6:49 PMFROM qwen3-coder:30b
PARAMETER num_ctx 65536
PARAMETER temperature 0.1
PARAMETER top_p 0.9
PARAMETER repeat_penalty 1.05
I am getting the following error:
litellm.APIConnectionError: OllamaException - {"error":"\"qwen3-coder-agent\" does not support thinking"}
I looked into the All page under settings:
http://localhost:3000/settings
but couldn't find a way to toggle the thinking mode.
Could someone guide me on how to do this?
cc: @important-diamond-63626 @gentle-apple-32922gentle-apple-32922
06/10/2026, 7:05 PMnutritious-balloon-65098
06/10/2026, 7:06 PMgentle-apple-32922
06/10/2026, 7:09 PMgentle-apple-32922
06/10/2026, 7:09 PMgentle-apple-32922
06/10/2026, 7:09 PMBased on your questions, here's what's happening and how to address it:
## Issue 1: "qwen3-coder-agent" does not support thinking
The error occurs because OpenHands is sending thinking-mode parameters to themodel, but that model variant doesn't support thinking mode. Here's how to fix it:qwen3-coder-agent
### Option A: Use a model that supports thinking
Thebase model doesn't have thinking enabled by default. You need to either:qwen3-coder:30b
- Use a thinking-enabled variant likeor similarqwen3-coder:30b-abliterator
- Or disable thinking mode in OpenHands
### Option B: Disable thinking mode in OpenHands
Add this to your Modelfile:
```dockerfile
PARAMETER thinking off
```
Or in youror environment settings, look for aconfig.tomlorthinkingsetting and set it toenable_thinking.false
---
## Issue 2: Viewing System Prompt in OpenHands
You can view the system prompt being sent to the LLM by:
### Method 1: Check the OpenHands Docker Container
```bash
docker exec -it <container_name> bash
# Then look at the config or logs
cat /app/openhands/config.py | grep -i system
```
### Method 2: Enable debug logging
Set environment variable in your docker-compose:
```yaml
environment:
LOG_LEVEL: DEBUG
```
Then check logs:
```bash
docker logs <container_name> 2>&1 | grep -i "system.prompt\|system_prompt\|prompt"
```
### Method 3: Find the system prompt in source code
The system prompts for OpenHands are typically defined in:
-directory/app/openhands/llm/
- Look for files likeorprompt.pysystem.py
```bash
docker exec -it <container_name> find /app -name "*.py" -exec grep -l "system.*prompt\|SYSTEM_PROMPT" {} \;
```
---
## Quick Fix for Your Error
The most likely fix is to either:
1. Add to your Modelfile:orPARAMETER disable_thinking truePARAMETER thinking false
2. Use a different model identifier that doesn't trigger thinking mode
3. Check OpenHands settings in the UI for a "Thinking Mode" toggle (sometimes it's under advanced settings)
Would you like me to help you locate the specific configuration file in your OpenHands Docker setup to disable thinking mode?
brash-grass-52323
06/10/2026, 7:12 PMdocker exec -it openhands-app shgentle-apple-32922
06/10/2026, 7:16 PMbrash-grass-52323
06/10/2026, 7:19 PMbrash-grass-52323
06/10/2026, 7:20 PMgentle-apple-32922
06/10/2026, 7:21 PMgentle-apple-32922
06/10/2026, 7:21 PMgentle-apple-32922
06/10/2026, 7:25 PMbrash-grass-52323
06/10/2026, 7:34 PMexport LLM_EXTRA_BODY='{"think": false}'
# echo $LLM_EXTRA_BODY
{"think": false}
but still getting the same error
litellm.APIConnectionError: OllamaException - {"error":"\"qwen3-coder-agent\" does not support thinking"}quick-window-91705
06/10/2026, 7:55 PMcalm-artist-7206
06/10/2026, 8:32 PMbrash-grass-52323
06/10/2026, 8:34 PMbland-bear-604
06/10/2026, 8:38 PMPARAMETER think false
Then recreate: ollama create qwen3-coder-agent -f Modelfile
Or skip the Modelfile and use ollama/qwen3-coder:30b directly as your model in OpenHands settings.calm-artist-7206
06/10/2026, 8:45 PMexport LLM_EXTRA_BODY='{"think": false}'is exactly what I was thinking, but passed to the agent-server container π€
bland-bear-604
06/10/2026, 8:46 PMreasoning_effort to "high". litellm sees that Ollama qwen3-coder supports it, and maps reasoning_effort="high" to think: true for Ollama. Your model rejects it.
Fix: pass -e LLM_REASONING_EFFORT=none to your docker run command. This is not currently exposed in the web UI settings.brash-grass-52323
06/10/2026, 8:50 PMbrash-grass-52323
06/10/2026, 8:52 PMcalm-artist-7206
06/10/2026, 8:52 PMcalm-artist-7206
06/10/2026, 8:55 PMbrash-grass-52323
06/10/2026, 8:58 PMbland-bear-604
06/10/2026, 9:16 PM-e LLM_REASONING_EFFORT=none
Option 2 - explicit agent-server env override (if option 1 does not work):
-e OH_AGENT_SERVER_ENV='{"LLM_REASONING_EFFORT": "none"}'
Option 2 passes the var directly to the agent-server container. Both should prevent litellm from sending reasoning_effort=high (which Ollama maps to think: true).
Also worth checking the Settings page in the UI - under Advanced LLM settings, if there is a reasoning effort field, clearing it there should also work.brash-grass-52323
06/11/2026, 12:30 PMbland-bear-604
06/11/2026, 12:39 PMnone is not enough - litellm still sends think: false to Ollama, and your model rejects ANY think parameter (even false).
The fix is to set reasoning effort to empty/null (not the string "none"). In the Settings UI, clear the reasoning effort field completely so it is blank.
Here is what I verified with litellm locally:
reasoning_effort=high -> sends think: True (rejected)
reasoning_effort=none -> sends think: False (ALSO rejected by Ollama)
reasoning_effort=null -> no think param sent (works!)
So the key is: the field must be empty/unset, not set to "none". If the UI does not let you clear it fully, try setting LLM_DROP_PARAMS=true in your docker run command as a fallback.calm-artist-7206
06/11/2026, 12:49 PMbrash-grass-52323
06/11/2026, 12:52 PMLLM_DROP_PARAMS=truebrash-grass-52323
06/11/2026, 12:52 PMdocker run -it --rm --pull=always \
-e AGENT_SERVER_IMAGE_REPOSITORY=<http://ghcr.io/openhands/agent-server|ghcr.io/openhands/agent-server> \
-e AGENT_SERVER_IMAGE_TAG=1.19.1-python \
-e OH_AGENT_SERVER_ENV='{"LLM_REASONING_EFFORT": "none"}' \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands:/.openhands \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.openhands.dev/openhands/openhands:1.7calm-artist-7206
06/11/2026, 12:55 PMbland-bear-604
06/11/2026, 12:58 PMexport PROJECTS_PATH="$HOME/projects"
mkdir -p "$PROJECTS_PATH" "$HOME/.openhands"
docker run -it --rm \
-p 8000:8000 \
-v "$HOME/.openhands:/home/openhands/.openhands" \
-v "${PROJECTS_PATH}:/projects" \
<http://ghcr.io/openhands/agent-canvas:1.0.0-rc.3|ghcr.io/openhands/agent-canvas:1.0.0-rc.3>
Then open http://localhost:8000. In Settings, you will see a Reasoning effort dropdown under the LLM section. Clear it (set to empty/blank) for your qwen3-coder model.
Agent-canvas is a single container with the agent-server built in, so there is no docker-in-docker relay problem. I am going to test this locally now and will follow up with results.bland-bear-604
06/11/2026, 12:59 PMreasoning_effort=high -> think: True (rejected)
reasoning_effort=none -> think: False (ALSO rejected)
reasoning_effort=null -> no think param (works!)
drop_params=True + high -> think: True (no help - litellm thinks param is supported)
So LLM_DROP_PARAMS will not help here either. The only fix is clearing reasoning effort to empty/null.
In agent-canvas, the Settings page has a Reasoning Effort dropdown that you can clear to blank. That sends null and litellm will not add the think parameter at all.brash-grass-52323
06/11/2026, 1:58 PMbrash-grass-52323
06/11/2026, 2:05 PMcalm-artist-7206
06/11/2026, 2:05 PMcalm-artist-7206
06/11/2026, 2:06 PMbrash-grass-52323
06/11/2026, 2:06 PM