> ## Documentation Index
> Fetch the complete documentation index at: https://docs.9thprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Models & Auto routing

> How 9p picks a model for each turn, and how to override it.

The default model is **`Auto`**. Instead of pinning one model for everything,
9p classifies each turn and picks from the models your plan allows.

```
◆ auto → z-ai/glm-4.7-flash (trivial task)
◆ auto → moonshotai/kimi-k2.7-code (normal task)
◆ auto → anthropic/claude-sonnet-5 (complex task)
```

The line is printed every turn, so you always know what ran.

## How a turn is classified

| Class       | Looks like                                                 | Routes to                                 |
| ----------- | ---------------------------------------------------------- | ----------------------------------------- |
| **trivial** | typos, renames, "what is this file", terse one-liners      | GLM 4.7 Flash                             |
| **normal**  | ordinary feature work                                      | Kimi K2.7 Code                            |
| **complex** | refactors, debugging, architecture, planning, long prompts | Sonnet 5 → GPT-5.3 Codex → Gemini 2.5 Pro |

Signals used: keywords (`refactor`, `debug`, `migrate`, `why does…`), prompt
length, and whether you're in [plan mode](/permissions) — plan mode is always
treated as complex.

<Note>
  Routing resolves **once per message**, not per tool call. Switching models
  mid-loop would discard the provider's prompt cache, which is what keeps a long
  session affordable.
</Note>

## Bias

```
/bias economy     # shift one step cheaper
/bias balanced    # default
/bias quality     # shift one step stronger; unlocks premium on hard turns
```

This persists to `~/.9p/config.json`, or set `NINEP_AUTO_BIAS` per run.

`quality` is the only way Auto reaches premium models, and only on turns already
classified complex.

## Pinning a model

```
/model anthropic/claude-sonnet-5   # pin
/model                             # show current
/model auto                        # hand routing back
```

Or for a whole session: `NINEP_MODEL=z-ai/glm-4.7 9p`

`/models` lists the catalog with tiers, burn rate per heavy session, and which
ones your plan locks.

## Tiers

| Tier         | Available on   | Models                                                                                                                |
| ------------ | -------------- | --------------------------------------------------------------------------------------------------------------------- |
| **Economy**  | all paid plans | GLM 4.7 Flash, Qwen3 Coder Flash, Gemini 2.5 Flash, DeepSeek V3.2, GLM 4.7, Qwen3 Coder, MiniMax M2.5, Kimi K2.7 Code |
| **Standard** | all paid plans | Sonnet 5, Haiku 4.5, Gemini 2.5 Pro, GLM 5.2, GPT-5.3 Codex, GPT-5 Mini                                               |
| **Premium**  | Max only       | Kimi K3, Opus 4.8, Opus 4.8 Fast, Fable 5                                                                             |

Free accounts get economy models only.

<Warning>
  **Kimi K3 is frontier-priced despite being an open model** — roughly $17.70 of
    raw cost for a heavy session against $11.80 for Sonnet 5. It sits in Premium for
  that reason, and **Auto never selects it**, because a model that expensive should
  be a deliberate choice. Max users can pin it with `/model moonshotai/kimi-k3`.
</Warning>

## Sub-agent routing

[Explore sub-agents](/sub-agents) are pinned to economy models regardless of the
parent's pick. They read and summarise; a frontier model there is pure burn, and
they often run several at once.

## BYOK

With your own OpenRouter key there are no plan locks, so Auto picks from its
full ladder and `/model` accepts any OpenRouter model id.
