# Model Thinking / Reasoning Behavior

## Native Thinking Output by Model

| Model | Architecture | Native Thinking | Manifestation | Suppression |
|---|---|---|---|---|
| **gemma-12b** | Gemma 4 Dense | ❌ No | Clean output. No thinking tags, no `reasoning_content` | N/A — clean by default |
| **gemma-26b-200k** | Gemma 4 MoE | ❌ No | Clean output. `--reasoning off` fully effective | N/A — clean by default |
| **nemotron-3-nano-30b** | Nemotron 3 (MoE) | ❌ No | Clean output | N/A — clean by default |
| **glm-4.7-flash-reap** | GLM MoE | ✅ Yes | Outputs `reasoning_content` JSON field instead of `content`. Without `--reasoning off`, `content` is empty | `--reasoning off` (REQUIRED) |
| **nemotron-term-14b** | Qwen3-derived | ⚠️ Mild | May produce occasional `<think>` tags | `--reasoning off` mostly works |
| **qwen36-35b-mtp** | Qwen 3.6 | ✅ Yes | Always emits `<think>`/`<thinking>` tags in raw output, regardless of `--reasoning off` flag | Cannot suppress server-side — Open WebUI Thinking toggle OFF filters display |
| **qwen3-coder-next** | Qwen 3 Coder Next | ✅ Yes | Same behavior as qwen36 — always emits thinking tags | Cannot suppress server-side |

## How Open WebUI Renders Thinking Output

Open WebUI's middleware (in `open_webui/utils/middleware.py`) detects these tag patterns in the model's raw output and wraps them in `<details type="reasoning">` UI blocks:

```python
DEFAULT_REASONING_TAGS = [
    ('<think>', '</think>'),
    ('<thinking>', '</thinking>'),
    ('<reason>', '</reason>'),
    ('<reasoning>', '</reasoning>'),
    ('<thought>', '</thought>'),
    ('<|begin_of_thought|>', '<|end_of_thought|>'),
]
```

It also handles `reasoning_content` field from the API response JSON (GLM models).

The "Thinking" toggle in the Open WebUI toolbar controls whether these tag blocks are rendered expanded or collapsed. Toggling it OFF collapses the reasoning blocks but does NOT prevent the model from emitting them — the tags are still in the raw response.

## The Loading-Screen Feedback Loop

When a model (especially Qwen) generates thinking content that includes "llama-swap loading model: X" text (because the chat history contains it), subsequent turns reinforce this pattern:

1. Model generates "llama-swap loading model: X" as part of its chain-of-thought
2. Open WebUI renders it as "Thought for X seconds"
3. Next turn, the model sees this text in chat history
4. Model continues generating loading-themed thinking in subsequent turns
5. User sees "thinking stuck on" with loading-screen jokes

**Fix:** Start a new chat (avoid history contamination). Do NOT continue a conversation that has loading-themed thinking in prior messages.
