01Installation
#What you need
A modelmile key. It links the plugin to your account and to your message balance. Without a key the plugin picks nothing: it has no way to know which account a message belongs to.
Create one from your account at www.modelmile.dev. You can create as many as you like — one per machine, for instance.
You also need Claude Code 2.1.317 or later. On an older version the plugin stays disabled and says so when the session starts.
#The command
claude plugin install modelmile --marketplace https://www.modelmile.dev/marketplace.json --config apiKey=your-key-here
--marketplace https://www.modelmile.dev/marketplace.json tells Claude Code where to find the plugin. Without it, Claude Code looks in a local catalogue and finds nothing.
--config apiKey=… stores the key in the same command. A second setting — the level — is added by repeating the option, never by appending it to the first one:
claude plugin install modelmile --marketplace https://www.modelmile.dev/marketplace.json --config apiKey=your-key-here --config ambiance=econome
One line instead of two: a command that fails reads better than a chain where you can no longer tell which part broke.
#Check the installation
claude plugin list
modelmile must appear in the list. If it does not, the command did not go through: run it again and read what the terminal says.
Once inside a session, /modelmile-etat answers in one line: active or paused, the current level, and the last decision taken.
#Update
claude plugin install modelmile --marketplace https://www.modelmile.dev/marketplace.json
The same command updates an already installed plugin. Your key and level are kept.
#Uninstall
claude plugin uninstall modelmile
The local log stays in ~/.modelmile/journal/. Delete the folder if you no longer want it.
02Getting started
#The four commands
They work at any moment, in any session.
#/modelmile-pause
Pauses the plugin. The current model and effort are kept as they are: the plugin decides nothing more until it is resumed.
You: /modelmile-pause Claude: modelmile paused. Model and effort stay as they are until /modelmile-reprise.
#/modelmile-reprise
Resumes decisions, from the very next message.
You: /modelmile-reprise Claude: modelmile active again. Decisions resume on the next message.
#/modelmile-etat
Shows the plugin's state: active or paused, the current ambient setting, and the last decision taken.
You: /modelmile-etat Claude: modelmile: active, ambiance normale. Last decision: claude-opus-5-5 (effort high).
#/modelmile-journal
Shows the last ten decisions. Each line carries the timestamp, the message, the model kept, the effort and the reason.
You: /modelmile-journal Claude: 2026-11-06T20:15:30.123Z m-1 claude-sonnet-5-5 medium model changed 2026-11-06T20:16:45.678Z m-2 claude-opus-5-5 high model changed 2026-11-06T20:17:02.940Z m-3 claude-opus-5-5 high kept: no reason to change
#The choice happens before sending
There is nothing to start for modelmile to work. The choice is made on every message, on your machine, before the request leaves: you write as usual, and the model and the effort adjust behind you.
#What changes in your session
Nothing visible, except the log. The plugin touches neither your conversation, nor your files, nor the shape of the answers. It changes two values of the request — the model and the effort — and records them.
What it does not do, and this is worth saying: it picks nothing without a key, it never changes a model it does not recognise, and a request it cannot classify is left exactly as it is.
03Automatic selection
#What the plugin looks at
On every message, modelmile reads what you are asking — before the request leaves — and picks the model and effort that suit that message. The next message is judged on its own: nothing is fixed for the whole session.
The reading happens on your machine, with no model call. What you type does not travel to us to be classified.
#The three models
The factor of forty is the heart of the saving: a message that does not need Opus costs a fraction of its price on Haiku, at the same quality.
#How it chooses
It chooses according to what you ask, without us saying how. That part of the product is not published: a rule written in plain sight can be copied, and there would be no reason left to pay for the subscription. What you can check yourself is the result — every decision is written to the log with the model kept, the effort and its reason.
What the plugin guarantees, on the other hand, is visible everywhere:
- it never drops below what the request needs;
- it only climbs when the request justifies it;
- it would rather decide nothing than invent a decision.
#What triggers a change
Not every request triggers a change. When modelmile does not recognise the kind of task, it leaves the message exactly as it is and records that in the log: it would rather decide nothing than invent a decision.
It also accounts for what your access serves. If a model is not available — behind a proxy, for instance — it falls back to the best model offered at the same effort. And if your message balance is spent, it stops choosing until the next top-up: your session carries on with the model you set yourself.
#What it never touches
A model outside the three known families — a name specific to a proxy, an older version — is never replaced. The plugin does not know every provider's naming scheme, and it does not guess: it keeps the model and says so in the log.
04Taking control
#Putting the plugin on pause
/modelmile-pause freezes the current model and effort: the plugin decides nothing more until it is resumed. It is the most direct way to keep control of a session — during the pause you pick your model as usual, and nothing changes it.
#Resuming decisions
/modelmile-reprise brings them back from the very next message. Nothing is lost: the plugin starts again from what you set yourself.
#Choosing a model by hand
If you switch model with /model, the plugin respects your choice for that message. On the next message it resumes its decisions. That is the intended behaviour: your gesture is an instruction for the current message, not a permanent setting.
For a permanent setting, use /modelmile-pause, or the level — see Configuration.
#Seeing what it decided
/modelmile-etat says whether it is active or paused, the current level, and the last decision taken. /modelmile-journal shows the last ten, with their reason — that is where you check it has not done anything strange.
#The log is yours
The local log lives in ~/.modelmile/journal/, one file per session, in JSONL. It is never sent anywhere. You can open it, filter it, delete it: it is a file on your machine, and removing it breaks nothing.
05Configuration
#The level
Three notches shift the choice, and nothing else:
- `econome`: one notch down, on every task;
- `normale` (the default): the choice as it is;
- `exigeante`: one notch up, on every task.
claude plugin install modelmile --marketplace https://www.modelmile.dev/marketplace.json --config ambiance=exigeante
No level leaves the permitted combinations: exigeante does not turn Haiku into Opus, it climbs one notch as long as there is a notch above.
#Changing the level after installation
claude plugin configure modelmile@modelmile
The command shows the options and those still to be set. The same install command as above also works: it does not install a second time, it records the setting.
#The key
The key is what links the plugin to your account. Without it, the plugin picks nothing: it has no way of knowing which account a message belongs to, nor what balance is left.
claude plugin install modelmile --marketplace https://www.modelmile.dev/marketplace.json --config apiKey=your-key-here
One key per machine is simplest. A revoked key unlocks nothing — it is the first thing to check when nothing changes any more.
#Models your access serves
At every session start, the plugin asks the platform which models and which efforts your access serves. That is what lets it never send a request towards a model absent behind your proxy.
If the platform does not answer, the plugin assumes everything is available rather than blocking your session. An outage on our side must not stop your work.
#Uninstall
claude plugin uninstall modelmile
The local log stays in ~/.modelmile/journal/: delete the folder if you no longer want it.
06Troubleshooting
#The plugin changes my model when I had chosen it
It respects your choice for the current message, then resumes on the next one. To stop it completely: /modelmile-pause.
#It picks nothing at all
The key is missing, or it has been revoked. The plugin installs without a key, but it decides nothing: the key is what links it to your account and to your balance. /modelmile-etat says so in one line.
#My proxy does not serve Opus
If your access does not serve a model, the plugin falls back to the best model available at that effort, walking down the scale. No request is ever sent to a model you do not have.
#My message balance is spent
The plugin stops choosing until the next top-up. Your Claude Code session carries on as usual: it simply uses the model and effort you set yourself.
#The plugin stays disabled at startup
It requires Claude Code 2.1.317 or later. On an older version it disables itself and writes that to the debug log. Update Claude Code, then restart the session.
#Nothing works, where do I start
claude plugin list— is the plugin installed?/modelmile-etat— is it active, and what was its last decision?/modelmile-journal— is the decision written there, with its reason?- Is the key really the one for your account? A revoked key unlocks nothing.
If all four answer and nothing changes, write to us at contact@modelmile.dev with the output of /modelmile-etat. That is what saves us the most time.
#Where the log is
~/.modelmile/journal/<date>-<session>.ndjson, one file per session. The old single journal.ndjson file is still read for display, but it is no longer written. An unreadable line is skipped, never fatal.