
.aider.model.metadata.json tells Aider the context and answer size of the models it does not know. It is a plain JSON file, with one block per model. With it, the "Unknown context window size" warning no longer shows for those models.
An example with two models
{
"openai/moonshotai/kimi-k2.7-code": {
"max_tokens": 16000,
"max_input_tokens": 262144,
"max_output_tokens": 16000,
"input_cost_per_token": 0,
"output_cost_per_token": 0,
"litellm_provider": "openai",
"mode": "chat"
},
"openai/deepseek-ai/deepseek-v4-pro": {
"max_tokens": 16000,
"max_input_tokens": 1048576,
"max_output_tokens": 16000,
"input_cost_per_token": 0,
"output_cost_per_token": 0,
"litellm_provider": "openai",
"mode": "chat"
}
}
The Aider documentation uses the same format, with an entry for each model, and asks for the full name with the provider in front. For our models, the provider is openai, the same as in --model.
What goes in each field
| Field | What to put |
| The block key | The name you pass in --model: openai/ plus the catalogue id, for example openai/moonshotai/kimi-k2.7-code. |
| max_input_tokens | The model's context: the context_length from GET /v1/models. |
| max_output_tokens | The most tokens in each answer. Our examples use 16000, which is enough for coding. |
| max_tokens | In our examples, the same value as max_output_tokens. |
| input_cost_per_token and output_cost_per_token | 0. Aider does not know AI credits or Coding Plan points. |
| litellm_provider | openai, because the API is OpenAI-compatible. |
| mode | chat. |
The max_output_tokens in GET /v1/models is the most each model accepts. Do not put a higher value.
Adding another model
|
|
|
|
The ids are in the Models tab of All in One AI or in the API list. On Linux and macOS:
curl "https://api.interweb.co.mz/v1/models?type=text" -H "Authorization: Bearer $INTERWEB_API_KEY"
In Windows PowerShell:
curl.exe "https://api.interweb.co.mz/v1/models?type=text" -H "Authorization: Bearer $env:INTERWEB_API_KEY"
Each model comes with its id (always with the slash), its context_length and its price in pricing. Listing the models spends no credits.
| One comma too many or too few, or curly quotes instead of straight ones, and the file is no longer valid JSON. Write it in a plain text editor, not a word processor. |
| The full file, with every model that supports tools, is in Aider with All in One AI. On Windows, see also how to save the file without .txt. |
|
Want our models in Aider with the right context? Visit the Coding with AI page. See Coding with AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $5.36/mo (3-year plan, with coupon) See plans |











