
Aider reads the address and the key from OPENAI_API_BASE and OPENAI_API_KEY. These are the names OpenAI uses, and they do not belong to Aider alone. Any program on the computer that reads them starts talking to the MozOut API, with your key.
What can happen
|
|
|
Names that belong to Aider
Aider has its own names for the same two things: AIDER_OPENAI_API_BASE and AIDER_OPENAI_API_KEY. They match the --openai-api-base and --openai-api-key options, as the Aider options list shows. On Linux and macOS:
export AIDER_OPENAI_API_BASE=https://api.mozout.co.mz/v1
export AIDER_OPENAI_API_KEY="prod_..."
On Windows:
setx AIDER_OPENAI_API_BASE https://api.mozout.co.mz/v1
setx AIDER_OPENAI_API_KEY "prod_..."
Close the terminal and open a new one. Nothing else changes: aider --model openai/moonshotai/kimi-k2.7-code.
Or in the config file
The address is not a secret and can go in the .aider.conf.yml in your home folder:
openai-api-base: https://api.mozout.co.mz/v1
The Aider documentation also accepts openai-api-key: in that file, but then the key is written in a file. If you do it, only use the one in your home folder, never the one at the repository root, which can end up in Git.
Removing the old variables
On Linux and macOS, delete the two lines from ~/.bashrc or ~/.zshrc and, in the open terminal:
unset OPENAI_API_BASE OPENAI_API_KEY
In Windows PowerShell:
[Environment]::SetEnvironmentVariable("OPENAI_API_BASE", $null, "User")
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", $null, "User")
Then close the terminal and open a new one.
| If the key ended up in a file that went into Git, or somewhere other people can see, revoke it and create another: what to do, in the right order. |
|
Want our models in Aider without touching your other programs? 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 396,00 MT/mo (3-year plan, with coupon) See plans |











