
Aider looks for .aider.model.metadata.json in three places, always in the same order. Knowing which one counts saves you from editing a file Aider is not using.
The three places, in order
| Order | Where | What for |
| 1 | Your home folder | Applies to every project. It is the simplest place. |
| 2 | The root of the Git repository | Applies to that project only and can go into Git with the code. |
| 3 | The folder where you start Aider | Applies when you start Aider in that folder. |
Aider reads the ones that exist, in this order, and the one read last takes priority. If the same model is in your home folder and in the repository, the repository data wins.
The home folder on each system
| System | File path |
| Linux | ~/.aider.model.metadata.json, that is /home/your-name/ |
| macOS | ~/.aider.model.metadata.json, that is /Users/your-name/ |
| Windows | %USERPROFILE%\.aider.model.metadata.json, that is C:\Users\your-name\ |
In PowerShell, $HOME is the same folder. To create the file there:
notepad "$HOME\.aider.model.metadata.json"
This article explains how to save it without Windows adding .txt.
A file with another name or in another folder
Tell Aider where it is, with --model-metadata-file:
aider --model-metadata-file ~/aider/models.json --model openai/moonshotai/kimi-k2.7-code
The same option can go in .aider.conf.yml, on the model-metadata-file: line, or in the AIDER_MODEL_METADATA_FILE variable.
In your team's repository
The file only holds model names and numbers, not the key. It can go into Git, at the project root, so the whole team has the same data. The key always stays out of the repository, in an environment variable.
| .aider.conf.yml and .env follow the same rule: home folder, repository root and current folder, in this order, and the one read last takes priority. |
|
Want to use our models in Aider in every project? 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 |











