# DeepSeek Reasoning Token Behavior

Both `deepseek-v4-flash` and `deepseek-v4-pro` use **reasoning tokens by default**. The model thinks in a `reasoning_content` field before producing visible output in `content`.

## Symptoms

- API calls with `max_tokens: 16` return **empty `content`** and `finish_reason: "length"`
- All allocated tokens are consumed by `reasoning_tokens`
- No error — the API works fine, just needs more token budget
- Affects all tools: Hermes, Aider, OpenCode, Open Interpreter

## Fix

**Set `max_tokens` to at least 256** (ideally 1024+) when using DeepSeek models:

```json
// Good
{"model":"deepseek-v4-flash","messages":[...],"max_tokens":256}

// Bad — no visible output
{"model":"deepseek-v4-flash","messages":[...],"max_tokens":16}
```

## Per-Tool Configuration

| Tool | Config Location | Setting |
|------|---------------|---------|
| Hermes | `~/.hermes/config.yaml` under `deepseek` | `max_output_tokens: 16384` (already set) |
| OpenCode | `opencode.json` under `deepseek` models | `limit: { output: 16384 }` (already set) |
| Aider | `~/.aider.model.settings.yml` | `max-output-tokens: 16384` (already set) |
| Open Interpreter | `~/.openinterpreter/config.toml` profiles | `max_output = 16384` (already set) |

## Verification

```bash
curl -s https://api.deepseek.com/v1/chat/completions \
  -H "Authorization: Bearer $DEEPSEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Reply with exactly: OK"}],"max_tokens":256,"temperature":0.01}'
```

If `content` is still empty after 256 tokens, increase to 1024. The reasoning overhead varies by prompt complexity.
