---
title: "Aider with EU-hosted open models · Setup guide"
description: "Run the Aider pair programmer on open-weight models processed in EU data centres. Two environment variables and the openai/ model prefix are all it takes."
canonical: "https://inference.eu/integrations/aider/"
language: "en"
---

Coding agents · Aider

# Use Aider with open-source models hosted in the EU

Aider is an open-source AI pair programmer for the terminal that edits code in your git repository and commits each change. It connects to any OpenAI-compatible API, so pointing it at inference.eu takes two environment variables. Your code is then processed by open-weight models in European data centres.

[Contact sales](https://inference.eu/contact/)[Setup](#setup)

1.  01API format: OpenAI
2.  02EU data centres
3.  03Covered by one DPA

## Set it up in a few minutes

1.  1

    Create an API key in your inference.eu account and export it as `INFERENCE_EU_API_KEY`.

2.  2

    Install aider with `python -m pip install aider-install` followed by `aider-install`.

3.  3

    Set `OPENAI_API_BASE` to the inference.eu base URL and `OPENAI_API_KEY` to your key.

4.  4

    Change into your project and run `aider --model openai/<model id>`, for example `openai/qwen3-coder-480b-a35b-instruct`.

5.  5

    Add a file with `/add`, ask for a small change and check the commit aider creates.

Terminal

```
# Aider reads OpenAI-compatible endpoints from these two variables.
export OPENAI_API_BASE="https://api.inference.eu/v1"
export OPENAI_API_KEY="$INFERENCE_EU_API_KEY"

# Prefix the model id with openai/ so aider uses the endpoint above.
cd /path/to/your/project
aider --model openai/qwen3-coder-480b-a35b-instruct --edit-format diff
```

## What Aider is

Aider is an open-source command-line tool for pair programming with a language model. You add files to the chat, describe a change, and aider edits the files and commits the result to git with a descriptive message. It builds a map of your repository so the model understands code outside the files you added, and it can run your linter and tests after each edit.

Aider works with many model providers through LiteLLM. Any endpoint that implements the OpenAI API can be used by setting a base URL and key, which is how it runs on inference.eu.

## How the configuration works

Aider reads `OPENAI_API_BASE` and `OPENAI_API_KEY` from the environment. Set the base to the inference.eu URL ending in `/v1` and the key to your inference.eu key. Then prefix the model id with `openai/`, as in `--model openai/glm-5.3`, so aider knows to send the request to the OpenAI-compatible endpoint.

You can put the same settings in `.aider.conf.yml` in your home directory or repository, using the keys `openai-api-base` and `model`, and keep the key in a `.env` file. Because aider does not know the context size of every model, add a `.aider.model.metadata.json` entry if you want accurate token warnings.

## Which models to choose

Aider asks the model to return edits in a structured format, so models that follow instructions precisely do best. `qwen3-coder-480b-a35b-instruct` with `--edit-format diff` is a strong default for everyday changes. `glm-5.3` and `kimi-k3` handle larger refactors and explanations well.

Aider's architect mode splits the work between two models: one plans the change, the other writes the edits. Try `--architect` with `--model openai/kimi-k3` and `--editor-model openai/qwen3-coder-480b-a35b-instruct`. For commit messages and chat summaries, aider uses a weak model; set `--weak-model openai/gpt-oss-120b` so those calls also go to inference.eu.

## Troubleshooting

A warning that aider does not know the model is expected for custom endpoints; it only means aider has no metadata such as context size. You can silence it with a metadata file. A 401 error means `OPENAI_API_KEY` is missing or holds a different key; check it in the shell where you start aider.

"Model not found" or a 404 usually means the `openai/` prefix is missing, so aider tried another provider, or the id after the prefix differs from the inference.eu id. If edits fail to apply, switch to `--edit-format diff` or `whole` and use one of the coding models above.

## Keeping code and data in the EU

Aider runs locally and sends model requests from your machine to the endpoint in `OPENAI_API_BASE`. With inference.eu, the files you add, the repository map and your instructions are processed in EU data centres and never used for training. We sign a data processing agreement under Article 28 GDPR, share our subprocessor list and bill in euros.

Set the main, editor and weak models to inference.eu models so no request falls back to another provider. Aider can collect anonymous analytics if you opt in; leave it off, or use `--analytics-disable`, if your policy requires it.

## Aider

Category

Coding agents

Maker

Aider AI (Paul Gauthier)

API format

OpenAI

Processing

EU data centres

Website

[aider.chat](https://aider.chat/)

Documentation

[aider.chat](https://aider.chat/docs/llms/openai-compat.html)

## Aider: common questions

The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.

Yes. Set \`OPENAI\_API\_BASE\` to inference.eu and \`OPENAI\_API\_KEY\` to your inference.eu key, and use model names with the \`openai/\` prefix. The variable names refer to the API format, not the company, so no OpenAI account is involved.

Aider routes requests through LiteLLM, which uses the prefix to pick a provider. \`openai/\` tells it to call an OpenAI-compatible endpoint at \`OPENAI\_API\_BASE\`. Without the prefix, aider may try to match a different provider and fail.

Qwen3 Coder 480B with the diff edit format is a strong default. Kimi K3 or GLM-5.3 work well as architect models paired with Qwen3 Coder as the editor model. Test them on a real change in your repository.

Aider has no built-in metadata, such as context window and token costs, for models on a custom endpoint. The model still works. Add an entry to \`.aider.model.metadata.json\` if you want accurate context warnings, or ignore the message.

Yes. Put \`openai-api-base\` and \`model\` in \`.aider.conf.yml\` in your home directory or project, and store the key in a \`.env\` file that is not committed. Aider loads both on start.

By default aider commits each change it makes with a descriptive message, so you can review or undo it with git. You can turn this off with \`--no-auto-commits\` if you prefer to commit yourself.

The model returned edits that did not match aider's format. Use \`--edit-format diff\` or \`--edit-format whole\`, pick a model that follows instructions closely such as Qwen3 Coder, and keep the number of added files focused on the task.

No. Aider sends the files you add to the chat in full, plus a compact repository map with key symbols from other files. You control which files are added. Everything sent goes only to the endpoint you configured.

Set the main model, \`--editor-model\` and \`--weak-model\` explicitly to inference.eu models with the \`openai/\` prefix. Aider otherwise picks a default weak model for commit messages, which might belong to a provider you did not intend to use.

Requests are processed in EU data centres, never used for training, and covered by an Article 28 GDPR data processing agreement with a published subprocessor list. Aider itself runs locally, so your code is sent only to inference.eu.

[Ask a question](https://inference.eu/contact/)

## Related

[All integrations](https://inference.eu/integrations/)

-   [OpenAI Codex CLIRun OpenAI's Codex CLI on open-weight models processed in EU data centres. Add a model\_providers block to config.toml and keep code in Europe.Coding agents](https://inference.eu/integrations/openai-codex/)
-   [OpenCodeRun the OpenCode terminal agent on open-weight models processed in EU data centres. Add one provider block to opencode.json and keep your code in Europe.Coding agents](https://inference.eu/integrations/opencode/)
-   [LiteLLMAdd inference.eu to the LiteLLM proxy or Python SDK with the openai/ prefix and route your team's requests to open-weight models processed in the EU.Gateways](https://inference.eu/integrations/litellm/)

## Move your AI workloads to EU infrastructure

Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.

-   Reply within one working day
-   Pricing for your volume
-   DPA ready to sign
