# Open WebUI Thinking Toggle — Model Routing Impact

The "Thinking" toggle in Open WebUI controls whether the frontend renders `<think>`/`<thinking>` tags as collapsed "Thought for X seconds" blocks.

## Critical Behavior: Model Auto-Override

When the Thinking toggle is ON, Open WebUI may **auto-select a model that supports reasoning** if the currently selected model does not natively output thinking tags. This causes:

- User selects gemma-26b-200k (no native thinking) in the dropdown
- Open WebUI overrides to qwen36-35b-mtp (has native thinking) when sending the request
- Chat metadata records the user's selection, but `chat_message.model_id` shows the overridden model
- User sees wrong model responding

## Symptoms

- Chat header says Model A, but response comes from Model B
- `chat_message` table in `webui.db` shows a different `model_id` than the chat's `models` metadata
- "Loading model: <different-model>" appears in the UI

## How to Diagnose

```bash
docker exec open-webui python3 -c "
import sqlite3, json
conn = sqlite3.connect('/app/backend/data/webui.db')

# Check if any chat has mismatched model vs messages
rows = conn.execute('''SELECT c.id, c.chat, m.model_id
    FROM chat c
    JOIN chat_message m ON c.id = m.chat_id
    WHERE m.role = 'assistant'
    ORDER BY m.created_at DESC LIMIT 10''').fetchall()
for r in rows:
    chat = json.loads(r[1])
    chat_models = chat.get('models', [])
    print(f'chat: {chat_models} | message model: {r[2]}')
"
```

## Fix

1. **Turn off the Thinking toggle** in the chat toolbar
2. **Start a new chat** — don't continue old ones with model-switch mid-stream
3. The toggle does NOT affect raw API calls (curl, Hermes, Continue) — only Open WebUI frontend

## Models Affected

| Model | Native Thinking | Toggle auto-routes to it? |
|---|---|---|
| gemma-12b | No | No |
| gemma-26b-200k | No | No |
| nemotron-3-nano-30b | No | No |
| glm-4.7-flash-reap | Yes (reasoning_content) | Yes |
| nemotron-term-14b | Mild | Possibly |
| qwen36-35b-mtp | Yes (`<think>` tags) | Yes |
| qwen3-coder-next | Yes | Yes |
