# aider

Terminal editing assistant; --watch-files is an optional editor workflow.

Source: https://zrelay.net/docs/agents/coding-agents/aider/

## Manual setup

1. Check aider --version and aider --help. Create a separate zrelay-aider-models.yml with the first block, preserving existing configuration. Use a DeepSeek Flex/Prime key for deepseek-v4.1-flash Chat Completions.

2. In Bash enter the key privately and run the shown command from the same directory. AIDER_OPENAI_API_KEY is set only for that process; do not pass a literal key as a CLI argument or change global OPENAI_API_KEY. In PowerShell use a temporary AIDER_OPENAI_API_KEY and restore its previous value in finally.

3. Keep main, weak and editor models explicit. The openai/ prefix selects the adapter; the sent catalog model remains deepseek-v4.1-flash. Start without streaming and with auto-commits off.

4. Check existing aider/extra_params: they override per-model settings. Keep effective max_tokens at or below 4096. Optional --model-metadata-file entries use the complete openai/deepseek-v4.1-flash key, litellm_provider: openai and mode: chat; metadata does not replace extra_params.max_tokens. Do not invent prices.

## Configuration and commands

```
- name: openai/deepseek-v4.1-flash
  extra_params:
    max_tokens: 4096
```

```
read -r -s -p 'Zrelay API key: ' ZRELAY_API_KEY
AIDER_OPENAI_API_KEY="$ZRELAY_API_KEY" aider \
  --openai-api-base https://api.zrelay.net/v1 \
  --model openai/deepseek-v4.1-flash \
  --weak-model openai/deepseek-v4.1-flash \
  --editor-model openai/deepseek-v4.1-flash \
  --model-settings-file ./zrelay-aider-models.yml \
  --no-auto-commits --no-stream
unset ZRELAY_API_KEY
```

## Alternative: ask an AI assistant

Copy this complete prompt into your coding assistant. It describes configuration work; installation and paid tests need your authorization.

```
Configure my installed Aider for Zrelay. Detect OS, shell and Aider version using local version/help commands. Read https://aider.chat/docs/llms/openai-compat.html, https://aider.chat/docs/config/options.html and https://aider.chat/docs/config/adv-model-settings.html. Read https://keys.zrelay.net/api/catalog and select an enabled Chat Completions model matching my key's provider/pool; deepseek-v4.1-flash is an example, not a guarantee.
Preserve existing configuration, credentials and defaults. Create a separate model-settings YAML with the fully qualified openai/deepseek-v4.1-flash name and extra_params.max_tokens at or below the catalog limit. Check existing aider/extra_params precedence. Use https://api.zrelay.net/v1 and explicitly select compatible main, weak and editor models. Map locally entered ZRELAY_API_KEY to AIDER_OPENAI_API_KEY only for the launched process; never read, print, paste, log or commit the real key. Do not put secrets in CLI arguments. Keep auto-commits disabled. Start without streaming; do not claim inline completion or hosted-agent support.
Validate configuration syntax, installed CLI options and route/model consistency without paid calls. Ask explicit consent before installing/upgrading or paid inference. Report configuration evidence separately from untested runtime editing, streaming and tool behavior.
```

## Limits and verification

The reviewed release history includes v0.86.1 and main changes. This is a documented contract, not a completed editing test. It does not establish inline completion, hosted agents or tool parity.

These recipes were reviewed against documentation and public catalog data. No client installation, authenticated request, paid inference, streaming or tool loop was executed. Validate configuration first; a later short text test does not establish complete agent compatibility.

Recheck the [live catalog](https://keys.zrelay.net/api/catalog) and your key’s provider/pool. The reviewed examples have 128000 input and 4096 output maxima unless a client limitation above prevents controlling the request. Never print, log or commit credentials.

## Official sources

Documentation checked 2026-11-09; mutable sources can differ from your installed version.

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

[https://aider.chat/docs/config/options.html](https://aider.chat/docs/config/options.html)

[https://aider.chat/docs/config/adv-model-settings.html](https://aider.chat/docs/config/adv-model-settings.html)

[https://keys.zrelay.net/api/catalog](https://keys.zrelay.net/api/catalog)

[https://aider.chat/docs/config/adv-model-settings.html](https://aider.chat/docs/config/adv-model-settings.html)

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

[https://aider.chat/docs/usage/watch.html](https://aider.chat/docs/usage/watch.html)

[https://aider.chat/docs/config/dotenv.html](https://aider.chat/docs/config/dotenv.html)

[https://raw.githubusercontent.com/Aider-AI/aider/main/aider/main.py](https://raw.githubusercontent.com/Aider-AI/aider/main/aider/main.py)
