# Aider on Codex Pooler

Aider is an AI pair-programming tool for your terminal. It helps you make changes across an existing codebase or start a new project through conversation. Connect it to Codex Pooler to use your Pool's models while keeping Aider's file-editing workflow.

![Codex Pooler Aider integration](/codex-pooler-aider.webp)

## Before you start

- Install [Aider](https://aider.chat/docs/install.html) using the official instructions for your operating system.
- Have a Codex Pooler URL reachable from the client.
- Create a [Pool API key](/getting-started/quick-start/) and choose a model available to that Pool.

## Configure the connection

Use the commands for the terminal that starts the client. Environment-variable assignments below apply to that terminal; desktop apps and services need the variables in their own launch environment.

### Config file paths

| OS | Default config file |
| --- | --- |
| macOS | `~/.aider.conf.yml` |
| Linux | `~/.aider.conf.yml` |
| Windows | `%USERPROFILE%\.aider.conf.yml` |

These are the default locations. On Windows, paste the `%USERPROFILE%`, `%APPDATA%` or `%LOCALAPPDATA%` path into File Explorer's address bar. For a client installed inside WSL, use the Linux paths and commands inside WSL. Keep any custom configuration folder or profile you already use.

Put the stable route settings in `.aider.conf.yml`; Aider loads this file from your home directory, then the git repo root, then the current directory, with later files taking priority. Use `--config <filename>` only when you want one explicit config file.

Set `CODEX_POOLER_API_KEY` to your Pool API key. Keep the key out of the YAML file. Export it in the shell, or put it in a gitignored `.env` file that Aider can load:

**macOS / Linux / WSL**

```bash
export OPENAI_API_KEY="$CODEX_POOLER_API_KEY"
```

**Windows PowerShell**

```powershell
$env:OPENAI_API_KEY = "$env:CODEX_POOLER_API_KEY"
```

For a deployed instance, use:

```yaml title=".aider.conf.yml" frame="code"
model: openai/gpt-6-sol
openai-api-base: https://codex-pooler.example.com/v1
```

For local setup, change `openai-api-base` to `http://localhost:4000/v1`.

## Choose a model

Keep the `openai/` prefix when selecting a model available to your Pool.

Aider's `.aider.conf.yml` route settings do not carry context or output limits. If your installed Aider version does not recognize `gpt-6-sol`, use Aider's separate model metadata JSON file for model behavior and limits instead of adding unsupported context fields to the main config.

```jsonc title=".aider.model.metadata.json" frame="code"
{
  "openai/gpt-6-luna": {
    "max_tokens": 828400,
    "max_input_tokens": 700400,
    "max_output_tokens": 128000,
    "litellm_provider": "openai",
    "mode": "chat",
    "supports_function_calling": true,
    "supports_vision": true,
    "supports_reasoning": true
  },
  "openai/gpt-6-sol": {
    "max_tokens": 828400,
    "max_input_tokens": 700400,
    "max_output_tokens": 128000,
    "litellm_provider": "openai",
    "mode": "chat",
    "supports_function_calling": true,
    "supports_vision": true,
    "supports_reasoning": true
  },
  "openai/gpt-6-astra": {
    "max_tokens": 828400,
    "max_input_tokens": 700400,
    "max_output_tokens": 128000,
    "litellm_provider": "openai",
    "mode": "chat",
    "supports_function_calling": true,
    "supports_vision": true,
    "supports_reasoning": true
  }
}
```

When the Pool's `/v1/models` entry provides `context_length`, use that per-model effective value as the authoritative `max_tokens` value. The `828400` values above are long-profile examples for models whose selected Pool catalog source reports an 872000-token raw ceiling; the explicit 700400 input and 128000 output limits add up to that window. Provider accounts can temporarily report different ceilings for the same model, and a selected 272000-token profile exposes `258400`, so replace all three related limits together when the endpoint reports a different value.

## Verify the connection

Check Aider from a repository with a real file edit. The command should only need the one-off prompt when the config file is present:

**macOS / Linux / WSL**

```bash
aider \
  --message 'Create a file named aider-ok.txt containing exactly: aider ok. After the file exists, reply with exactly: aider ok' \
  --yes-always \
  --no-auto-commits \
  --no-git \
  --no-browser \
  --no-gui \
  --no-analytics
```

**Windows PowerShell**

```powershell
aider --message 'Create a file named aider-ok.txt containing exactly: aider ok. After the file exists, reply with exactly: aider ok' --yes-always --no-auto-commits --no-git --no-browser --no-gui --no-analytics
```

The check is only useful if `aider-ok.txt` exists with the expected content; a text reply alone does not prove Aider can edit through the configured model path.

In Codex Pooler's request logs, match the request time, API key, model, and final status to your test. A reply alone does not confirm that the client used your Pooler instance.

## Compatibility notes

The Pool API key authenticates `/v1` model requests. Do not use an operator MCP token as the OpenAI API key.

For shared route support and limits, see [OpenAI-compatible SDKs](/clients/openai-compatible/).