aider
aider talks to any OpenAI-compatible endpoint through two environment variables. Name the model with an openai/ prefix, which tells aider to use that endpoint.
What you need
Environment variables
pip install aider-chat
export OPENAI_API_BASE=https://api.opencheap.si/v1
export OPENAI_API_KEY=$OPENCHEAP_API_KEY
aider --model openai/claude-sonnet-5The prefix is aider's, not part of the model id: openai/claude-sonnet-5 sends claude-sonnet-5 to OpenCheap.
Keep it in the repo
The base URL and the model can live in .aider.conf.yml. The key stays in the environment as OPENAI_API_KEY, so the file is safe to commit.
model: openai/claude-sonnet-5
openai-api-base: https://api.opencheap.si/v1
edit-format: diffaider does not know OpenCheap's models and warns about an unknown context window. To silence it and set the limits, add the model to .aider.model.metadata.json next to the config, with the context length from the Models page:
{
"openai/claude-sonnet-5": {
"max_input_tokens": 1000000,
"max_output_tokens": 16384,
"litellm_provider": "openai",
"mode": "chat"
}
}What was checked
Run on October 28, 2026 with aider 0.86.2 on claude-sonnet-5, both ways: the two variables with the --model flag, and the config and metadata files above. Each applied a one-line edit to a file. Without the metadata file aider prints the context-window warning and works.