> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opper.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Aider

> Point Aider at Opper to pair-program in your terminal on any model in the catalog

[Aider](https://aider.chat) is an open-source AI pair programming tool for the terminal (Apache-2.0, [source](https://github.com/Aider-AI/aider)). It edits code in your local git repo and commits as it goes.

Aider treats any OpenAI-compatible endpoint as an OpenAI provider, so two environment variables point it at Opper.

## Setup

```bash theme={null}
export OPENAI_API_BASE=https://api.opper.ai/v3/compat
export OPENAI_API_KEY=your-opper-api-key
aider --model openai/anthropic/claude-sonnet-4-6
```

On Windows, use `setx OPENAI_API_BASE ...` and `setx OPENAI_API_KEY ...` instead.

<Note>
  The `openai/` prefix is Aider's own routing marker — it tells Aider to use its OpenAI-compatible client. Everything after it is the Opper model ID, which carries its own provider prefix. So `anthropic/claude-sonnet-4-6` on Opper becomes `openai/anthropic/claude-sonnet-4-6` on the Aider command line.
</Note>

## Choosing a model

Any model ID from the [catalog](/capabilities/models), prefixed with `openai/`. To make it stick, put it in `.aider.conf.yml` at the root of your repo:

```yaml theme={null}
model: openai/anthropic/claude-sonnet-4-6
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Aider says the model is unknown">
    Aider needs the `openai/` prefix to route through its OpenAI-compatible client. Without it, Aider tries to resolve the name against its built-in model list and fails.
  </Accordion>

  <Accordion title="401 Unauthorized">
    `OPENAI_API_KEY` must hold your **Opper** key, not an OpenAI one. Opper keys start with `op-`.
  </Accordion>

  <Accordion title="Aider warns about unknown context window or pricing">
    Aider keeps a static metadata map for models it knows. The warning is cosmetic and the model still works; set `--no-show-model-warnings` to silence it.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Model catalog" icon="list" href="/capabilities/models">
    Browse the catalog for model IDs and capabilities.
  </Card>

  <Card title="All integrations" icon="plug" href="/integrations/overview">
    Every app that runs on Opper.
  </Card>
</CardGroup>
