Use /model with Aider
Run Aider on /model with two environment variables, and tell it the limits of the models it doesn't know.
Checked November 24, 2026
Aider reaches /model through its OpenAI-compatible settings: a base URL, a key, and the model's id with openai/ in front.
Aider's last release, 0.86.2, came out in February 2026. These steps are for that release.
Before you start
- A /model API key: create one on the API keys page and add credit on the credits page.
Set it up
export OPENAI_API_BASE=https://api.slashmodel.com/v1
export OPENAI_API_KEY="$SLASHMODEL_API_KEY"
aider --model openai/claude-sonnet-5-5- The
openai/prefix makes Aider use these settings for any model:openai/gpt-6.1-sol,openai/claude-opus-5-5. - The same values can go in
.aider.conf.yml, asopenai-api-baseandopenai-api-key.
Tell Aider about the models
Aider doesn't know these model ids. Left alone, it warns that their context window is unknown, rewrites whole files instead of editing them, and leaves its repository map off. Two files fix that; put them in your home folder or at the top of your repository.
.aider.model.metadata.json gives each model's limits:
{
"openai/claude-sonnet-5-5": { "max_tokens": 64000, "max_input_tokens": 1000000, "max_output_tokens": 64000, "litellm_provider": "openai", "mode": "chat" },
"openai/claude-opus-5-5": { "max_tokens": 128000, "max_input_tokens": 1000000, "max_output_tokens": 128000, "litellm_provider": "openai", "mode": "chat" },
"openai/gpt-6.1-sol": { "max_tokens": 128000, "max_input_tokens": 1050000, "max_output_tokens": 128000, "litellm_provider": "openai", "mode": "chat" }
}.aider.model.settings.yml says how Aider should edit with them:
- name: openai/claude-sonnet-5-5
edit_format: diff
use_repo_map: true
- name: openai/claude-opus-5-5
edit_format: diff
use_repo_map: true
- name: openai/gpt-6.1-sol
edit_format: diff
use_repo_map: trueGood to know
- Without the first file, Aider warns "Unknown context window size and costs, using sane defaults" and asks whether to open its documentation. Answer no and it carries on;
--no-show-model-warningsskips the question. - The limits in that file are for Aider's own bookkeeping. Aider doesn't enforce them.
- Aider shows no cost for these models, because the file gives it no prices. What you paid is under Usage.