<!-- Markdown mirror. Canonical: https://empryo.com/docs/context/provider-options -->

# Thinking, effort & retries

> Thinking modes and budgets, reasoning effort per model and per provider, Anthropic context management, and rate-limit retry backoff.

Open `/provider-settings` to tune thinking mode, reasoning effort and budget per model. Or edit config directly:

```json
{
  "thinking": {
    "mode": "adaptive"
  }
}
```

## Thinking modes

| Mode | What it does |
|------|--------------|
| `off` | No thinking blocks |
| `adaptive` (or `auto`) | Model decides when to think (Claude 4+) |
| `enabled` | Fixed budget thinking - specify tokens |

Budgets when mode is `enabled`: 1024, 2048, 5000, 10000, 20000.

## Reasoning effort

Thinking is how much a model may think. Effort is how hard, on the models that take a level instead of a budget. Set it from the composer control, `/effort`, or config:

```json
{
  "performance": {
    "effort": "high"
  }
}
```

The levels, shallow to deep: `off`, `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`.

No model takes all eight. The control offers what the selected model accepts, and a level you set for everything drops to the deepest one the model does take. Picking a level never turns reasoning off.

Precedence, first match wins:

| Where | Key | Scope |
|-------|-----|-------|
| Per family | `performance.effortByFamily` | the composer quick-switch, one level per model family |
| Per provider | `performance.openaiReasoningEffort` and friends | every model from that provider |
| Shared | `performance.effort` | everything that takes a level |

| Key | Applies to |
|-----|------------|
| `openaiReasoningEffort` | OpenAI |
| `googleThinkingLevel` | Gemini |
| `xaiReasoningEffort` | Grok |
| `deepseekReasoningEffort` | DeepSeek |
| `groqReasoningEffort` | Groq |
| `openrouterReasoningEffort` | OpenRouter |
| `llmgatewayReasoningEffort` | LLM Gateway |
| `compatReasoningEffort` | every other OpenAI-compatible endpoint, coding plans included |

Edit them in `/provider-settings` on the terminal, or Provider Options in the desktop app.

## Context management (Anthropic)

Advanced Anthropic features, applied on supported models:

- **Clear Thinking** - on by default, preserves all thinking blocks (`keep: "all"`) so the prompt cache prefix stays stable.
- **Clear Tool Uses** - opt-in, clears old tool content once input passes 65% of the context window (minimum 120k tokens).
- **Compact** - opt-in, API-side compaction at 80% of context, on models with a 200k+ window.

## Graceful degradation

If a provider rejects an option (unsupported thinking mode, unknown parameter), Empryo retries with reduced options automatically. You don't see the error.

## Retries on rate limits

Getting 429s? Bump retry config:

```json
{
  "retry": {
    "maxAttempts": 5,
    "baseDelayMs": 3000
  }
}
```

Delays double each attempt: 3s, 6s, 12s, 24s, 48s.

| Field | Default | Range |
|-------|---------|-------|
| `maxAttempts` | `3` | 1, 10 |
| `baseDelayMs` | `1000` (chat) / `2000` (agents) | 250, 60000 |

## Next

The same panel carries the four [provider tools](/docs/context/provider-tools), computer use,
code execution, the Anthropic text editor and provider-side search, each row showing what it
resolves to on the model you have selected.
