Automatic model selection
With Auto, you don't pick a model. Codity picks one for each message you send, from Anthropic's Claude models and OpenAI's GPT models, and through OpenRouter from Google, DeepSeek, Qwen and xAI models too. A typo fix goes to a fast, inexpensive model; a migration or a hard bug goes to a frontier model. If the agent starts struggling partway through, Codity moves it to a stronger model. Auto is the default for codity agent, and it is available in the dashboard when the agent is paid for with Codity credits.
The models Auto chooses from
| Tier | Anthropic | OpenAI | Used for |
|---|---|---|---|
| Fast | Claude Haiku 5.5 | GPT-6 Luna | Small, clear edits, questions and explanations. Also titles and conversation summaries. |
| Balanced | Claude Sonnet 5.5 | GPT-6.1 Sol | Ordinary changes across a few files. |
| Frontier | Claude Opus 5.5 | GPT-6 Astra | Debugging an unknown cause, concurrency, security, performance, migrations and architecture. |
When both providers are available, Auto starts with OpenAI and stays with the provider your conversation is already using. It only uses models your billing can pay for: with Codity credits that is every model above; with your own keys it is the providers whose key is set on the machine (OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY, or any combination).
Models through OpenRouter
OpenRouter gives Auto models from other companies, and a way to reach Claude and GPT with a single key.
| Tier | Through OpenRouter |
|---|---|
| Fast | GPT-6 Luna, Claude Haiku 5.5, DeepSeek V4.1 Flash, Gemini 3.8 Flash |
| Balanced | GPT-6.1 Sol, Claude Sonnet 5.5, Gemini 4 Hydrogen, Qwen4 Max |
| Frontier | GPT-6 Astra, Claude Opus 5.5, Gemini 4 Argon, Grok 4.7 |
- Only an OpenRouter key on the machine: set
OPENROUTER_API_KEYand Auto routes every tier through OpenRouter, starting with the GPT models. - Claude or GPT is reachable directly: Auto calls it directly rather than through OpenRouter, which avoids OpenRouter's fee. OpenRouter's other models stay available: a second opinion after repeated failures can come from one of them, and you can pick any of them in the model picker (press
Ctrl+X, thenM). - Codity credits: Codity calls OpenRouter with its own account. OpenRouter is told to skip hosts that keep prompts, and hosts that charge well above the model's list price. These calls accept text only: a request with an image, file or audio part is refused, because those are billed beyond what the wallet hold covers.
- OpenRouter's own router: the picker also lists Auto Router under OpenRouter. With it, OpenRouter picks the model for each request instead of Codity. Auto never switches to it on its own; you choose it. On Codity credits, OpenRouter may only pick from the OpenRouter models in the table above. You pay for whichever model answered, and the run's call records show which one that was.
Priority
Every Auto agent has a priority that sets how readily Auto reaches for a stronger model.
| Priority | Behaviour |
|---|---|
| Cost | Uses the fast models unless a task clearly needs more. Lowest spend. |
| Balance (default) | Matches the model to each task and moves up when the agent gets stuck. |
| Intelligence | Never uses the fast tier for coding messages. Highest quality, higher spend. |
Set it when you start the agent (codity agent --router intelligence, or Auto model priority in the dashboard form). In the agent's terminal, press Ctrl+T to cycle the priority for your next message.
How a model is chosen
Each message you send is rated. Codity looks at what the message asks for (for example "fix the typo" against "find the root cause of the race condition"), its length, how many files it names and how large the conversation has become. When those signals disagree or say nothing, a fast model reads the message and rates it as trivial, routine, involved or hard. This rating only runs on agents paid for with Codity credits, costs a fraction of a cent, and is charged to your wallet like any other model call.
A few rules keep the choice stable and inexpensive:
- One model per message. The model chosen for your message handles every step of the agent's answer, unless the agent gets stuck (below).
- Short replies keep the model. "Yes", "continue" or "go ahead" carry on with the model already in use.
- Switching must pay for itself. Providers cache the conversation for the model that has been reading it. Auto moves to a cheaper model for an easier message only when the saving outweighs the cost of losing that cache.
- The conversation must fit. Auto skips any model whose context window the conversation would nearly fill.
Moving up when the agent struggles
While answering a message, the agent moves up one tier when any of these happen:
| Signal | Threshold |
|---|---|
| Tool calls failing in a row | 3 |
| Test or build runs failing | 2 |
| The same file rewritten | 3 times |
| Steps without changing a file | 8 |
It never moves down while answering a message. If it is already on the frontier tier and checks keep failing (3 failed test or build runs), Auto asks the other provider's frontier model for a second opinion. Your next message is rated afresh, so a hard turn doesn't keep the agent on an expensive model for the rest of the session.
Choosing a model yourself
In the agent's terminal, open the model list with /models and pick one of the models in the table above. Codity uses that model for your messages until you choose Auto again. To start on a fixed model instead, pass one when you launch:
codity agent --model anthropic/claude-sonnet-5-5
What it costs
You pay for each model call at the rate of the model that made it, whether that's the fast model or the frontier one. Nothing is added for routing. On Codity credits, each call is charged to your organization's wallet (see Model access and billing). A call through OpenRouter is charged at what OpenRouter reports it cost, plus 5.5% to cover OpenRouter's fee. With your own keys, your provider bills you directly.
To compare a session's spend with a fixed model, open the agent's page in the dashboard: it shows the tokens and spend for each run.

