Models and effort
How Nib chooses a model, how to switch models, and how reasoning effort maps onto each provider.
Every session has a model and an effort level. Nib picks both for you, and you can change either at any time, including in the middle of a session.
How Nib picks a model
When you add a provider, Nib lists its models and ranks them. Two choices come out of that:
- Main model. The model the agent runs on, chosen from the models that support tool calling and aren't marked deprecated. If the best model in the catalog's value tier scores close to the top model for agentic coding, Nib picks it; otherwise it picks the top model. Small and legacy models are picked only when there is nothing else.
- Small model. A fast, inexpensive model for auxiliary work: session titles, the auto-mode classifier, compaction summaries and web page extraction. Nib picks a model that passed its auto-mode evaluation, from the main model's family first; then the cheapest small model the evaluation hasn't covered; then the main model. It never picks a model the evaluation found unreliable at these structured side tasks.
The ranking comes from Nib's model catalog, which records each model's tier (frontier, value, open, small or legacy), context window, output limit, pricing, capabilities (tools, vision, PDF input, reasoning, prompt caching) and an agentic coding score. The catalog is built into Nib. When you're signed in, Nib also fetches a signed, updated catalog from its own service at startup and once a day. For a model a provider lists that the catalog doesn't know, Nib uses what the provider's list says about it and infers the rest from its model family.
The signed catalog can also name the small and strong models for a provider. Where it does, its choice comes first, and the ranking above fills in the rest. These side-work models are the same for everyone, and there's no setting for them.
The picks change as the catalog changes; the model picker shows which model a session runs on. For gateways such as OpenRouter and Vercel, Nib offers the gateway's model list sorted by agentic ranking.
With Nib models, the roles are models from Nib's lineup. A request can name a role by its address, and Nib resolves it to the role's model:
| Role | Model | Address | What it's for |
|---|---|---|---|
| Main | Claude Sonnet 5.5 | nib/default | Everyday work |
| Small | Claude Haiku 5.5 | nib/small | Titles, summaries, side tasks |
| Strong | Claude Opus 5.5 | nib/strong | Hard problems, reviews |
Choosing a model yourself
Models are written as provider:model, where provider is the id of a provider you configured. A bare model id means "this model on the session's current provider". A new chat opens on the model you picked last in the app or with /model. Your organization's managed settings and your settings files come first.
| Where | How |
|---|---|
| CLI, at start | nib -m anthropic:claude-sonnet-5-5 or nib --model gpt-6.1-sol |
| CLI, in a session | /model opens a picker; /model openrouter:z-ai/glm-5.3 switches directly |
| Desktop app | The model picker in the composer |
| Settings | "model": "anthropic:claude-opus-5-5" in any settings file |
| Subagents and skills | model: in the frontmatter |
Switching mid-session
You can switch models at any point. The conversation carries over. A few things to know:
- Reasoning state is replayed exactly to the same model. A different model receives a safe projection instead (the visible text, without opaque signatures), and Nib records that the replay was patched.
- The edit tool may change. Moving from Claude to GPT switches the agent from
Edittoapply_patch. The transcript and permission rules are unaffected because both map to the same canonical tool family. - The prompt cache starts cold on the new provider. The first turn after a switch costs more.
PreModelSwitch and PostModelSwitch hooks run around a switch, and a PreModelSwitch hook can deny it. See Hooks.
Effort
Effort controls how much the model reasons before it answers. Nib uses one scale for every provider and translates it.
| Level | Use it for |
|---|---|
none | No reasoning, when the model allows it. Fastest and cheapest |
minimal | Mechanical edits, renames, formatting |
low | Simple, well-specified changes |
medium | Everyday work. A good default for most sessions |
high | Debugging, cross-cutting changes, unfamiliar code |
xhigh | Hard problems where a wrong turn is expensive |
max | The model's full reasoning budget |
Set it with:
/effort highin the CLI (none,minimal,low,medium,high,xhighormax), or the effort control in the desktop appnib --effort highat start"effortLevel": "high"in settings, oreffort:in skill and subagent frontmatter
How effort maps to providers
Each model declares the efforts it accepts. If you ask for a level the model doesn't support, Nib clamps to the nearest supported one and tells you.
| Provider style | What Nib sends |
|---|---|
| Anthropic, adaptive thinking | thinking: adaptive with the effort level. minimal is sent as low |
| Anthropic, budgeted thinking (older models) | A thinking token budget: 1,024 for minimal, 4,096 low, 10,000 medium, 24,000 high, 32,000 xhigh, 48,000 max |
| OpenAI Responses | reasoning.effort |
| Gemini | A thinking level or budget, depending on the model |
| Open models (DeepSeek, GLM, Kimi, Qwen, MiniMax) | The provider's own reasoning switch, where it has one |
Some models can't turn reasoning off. On those, none uses the lowest setting the model allows.
Context window
Nib tracks token usage against the model's context window. When the window fills up, compaction frees space: first by trimming large old tool outputs (the agent can still read them in full in the session's history), then by summarizing the conversation with a structured handoff that preserves the task list, files touched and decisions made.
Run /compact to compact now, optionally with instructions: /compact keep the API design discussion. PreCompact and PostCompact hooks run around it.
Cost
Every assistant message records its usage: input tokens (including cache reads and writes), output tokens and reasoning tokens. Cost is computed from the catalog's pricing, and cache reads are billed at the cache rate. /cost in the CLI shows the session total. Headless runs report total_cost_usd in their JSON output. When pricing for a model is unknown, its cost is left out rather than guessed: total_cost_usd covers the priced part, and unpriced_tokens counts the tokens it doesn't cover.