aimldocs
Integrations

Aider

Use ai.ml from Aider through its OpenAI-compatible client.

Aider reaches any OpenAI-compatible API through its openai/ model prefix. Whatever follows the prefix is sent as the model name, so any ai.ml id or alias works.

Put your key in OPENAI_API_KEY and the rest in ~/.aider.conf.yml:

cookbook/integrations/aider/aider.conf.yml
# ~/.aider.conf.yml (or .aider.conf.yml in the repository)
# Aider talks to ai.ml through its OpenAI-compatible client: the openai/
# prefix selects that client and the rest is the ai.ml model id or alias.
model: openai/anthropic/claude-sonnet-4.6
weak-model: openai/gpt-5-mini
openai-api-base: https://api.ai.ml/v1
# the key: set OPENAI_API_KEY in your environment rather than here
  • model and weak-model both accept a full id (openai/anthropic/claude-sonnet-4.6) or an alias (openai/claude-sonnet-4-6). The weak model writes commit messages and summaries; point it at a cheap model.
  • Aider does not know the context window of a model outside its own list. It warns about this unless you pass --no-show-model-warnings. To give it real figures, add an .aider.model.metadata.json entry using context_length and max_output from GET /v1/models.
  • Without a config file: aider --model openai/claude-sonnet-4-6 --openai-api-base https://api.ai.ml/v1.

Verified with Aider 0.86.2, with both an id and an alias.