COPILOT_MODEL in ~/.max/.env.
Setting the default model
The model ID used by the orchestrator session. Must be available in your authenticated Copilot CLI.To list all available models:
copilot listModels~/.max/.env. If Copilot is not yet authenticated during setup, it falls back to a curated list.
Available models
The following models are shown duringmax setup when Copilot is not yet authenticated:
| Model ID | Name | Notes |
|---|---|---|
claude-sonnet-4.6 | Claude Sonnet 4.6 | Default — fast, great for most tasks |
gpt-5.1 | GPT-5.1 | OpenAI’s fast model |
gpt-4.1 | GPT-4.1 | Free included model |
The actual list of available models depends on your Copilot subscription and which models are enabled for your account. Run
copilot listModels to see what’s available in your environment.Switching models
- TUI command
- Edit ~/.max/.env
- Telegram
In the terminal UI, use the Or ask Max in plain English:The change takes effect immediately and is persisted to
/model command:~/.max/.env.Model persistence
Whenever you switch models at runtime, Max callspersistModel() to write the new value back to ~/.max/.env:
src/config.ts
max start picks up whatever was last written to ~/.max/.env.
Automatic model routing
Max includes an optional model router that automatically selects the most appropriate model based on the complexity of each message. It is disabled by default.How it works
When enabled, every incoming message goes through a two-stage selection process:- Keyword overrides — checked first, bypass the cooldown. Certain keywords force a specific model regardless of classification.
- LLM classification — the message is classified as
fast,standard, orpremiumby GPT-4.1. Each tier maps to a configured model.
Tier-to-model defaults
| Tier | Default model | Use case |
|---|---|---|
fast | gpt-4.1 | Short answers, quick lookups |
standard | claude-sonnet-4.6 | Most conversational tasks |
premium | claude-opus-4.6 | Complex reasoning, design tasks |
Keyword overrides
The router ships with one built-in override rule:| Rule name | Keywords | Model |
|---|---|---|
design | design, ui, ux, css, layout, styling, visual, mockup, wireframe, frontend design, tailwind, responsive | claude-opus-4.6 |
"ui" matches "update the UI" but not "fruit".
Router configuration
The router configuration is stored in themax_state SQLite table under the key router_config as a JSON blob:
cooldownMessages field controls how many messages must pass before the router is allowed to switch models again, preventing thrashing.
Follow-up handling
Short follow-up replies (“yes”, “do it”, “go ahead”, “looks good”, etc.) automatically inherit the tier from the previous turn rather than triggering a new classification. Background task completion messages always resolve tostandard regardless of content.