# Aider

[Aider](https://aider.chat/) pairs with you in the terminal to discuss and edit
code. Its OpenAI-compatible provider can send requests directly to Aurora.

> Available Inference endpoint: `https://ai.aur.lu/v1` (Aurora).

## Install and prepare

Install with the upstream installer, or follow the
[platform-specific instructions](https://aider.chat/docs/install.html):

```bash
python -m pip install aider-install
aider-install
export AURORA_API_TOKEN="<your-token>"
```

Create the token using [Getting started](https://docs.aur.lu/docs/inference/getting-started).

## Configure and launch

In the shell where you will run Aider:

```bash
export OPENAI_API_BASE="https://ai.aur.lu/v1"
export OPENAI_API_KEY="$AURORA_API_TOKEN"
aider --model openai/deepseek/deepseek-v4-flash
```

Run the command from your project directory. The leading `openai/` is Aider's
LiteLLM routing prefix; `deepseek/deepseek-v4-flash` remains the Aurora model ID.
Do not use the bare Aurora ID here, because provider auto-detection may choose
the direct DeepSeek API instead.

To persist the model choice, merge this into `.aider.conf.yml` in the project:

```yaml
model: openai/deepseek/deepseek-v4-flash
```

Keep the base URL and token in the launching environment. The URL already
includes `/v1` and Aider adds the chat path.

## Verify file context

In Aider, add a small existing file as read-only context and ask about it:

```text
/read-only README.md
/ask Summarize README.md in three bullets.
```

Expect a streamed summary of the file. Substitute another file if needed.
This tests file context; Aider's editing workflow differs from agents that use
native file-reading tool calls. Use `/add` when you want Aider to edit files.

## Troubleshooting

- **Unknown model / pricing warning:** Aider may lack metadata for a custom
  model. It is not proof of an API error. Use Aurora's catalog for limits and
  Portal for billing; configure metadata using Aider's advanced model settings
  if needed.
- **Wrong provider:** Keep `openai/` before the full Aurora model ID and set
  `OPENAI_API_BASE` (not `OPENAI_BASE_URL`).
- **Edits fail despite working chat:** Check Aider's selected edit format and
  model suitability. Chat compatibility does not guarantee reliable patch output.
- **Helper calls fail:** Review any configured weak/editor models; they need
  valid routes and model IDs too.

See [shared troubleshooting](https://docs.aur.lu/docs/inference/integrations#troubleshooting),
[Aider's OpenAI-compatible setup](https://aider.chat/docs/llms/openai-compat.html),
and [advanced model settings](https://aider.chat/docs/config/adv-model-settings.html).
