relay.fast
Aider setup

Run Aider with relay.fast models

Aider is an open-source pair-programming tool for the terminal. It connects to any OpenAI-compatible API, so relay.fast models work after you set two environment variables and prefix the model ID with openai/.

Start with relay.fast Read the API docs Русская версия

Install and connect

python -m pip install aider-install
aider-install
# macOS and Linux
export OPENAI_API_BASE=https://relay.fast/v1
export OPENAI_API_KEY=sk-your-api-key

# Windows (PowerShell), then open a new terminal
setx OPENAI_API_BASE https://relay.fast/v1
setx OPENAI_API_KEY sk-your-api-key
aider --model openai/claude-sonnet-5-5

The openai/ prefix tells Aider to send requests to the OpenAI-compatible base URL. Keep the rest of the ID exactly as the catalog lists it. There is no installer script for Aider; these steps are the whole setup.

Context window and cost display

Aider does not know relay.fast model IDs, so it warns that the context window and costs are unknown and uses defaults. A .aider.model.metadata.json file sets them; an example built from current prices is below. The costs only change what Aider displays; the charge is what relay.fast records for the request.

Main and weak models

Aider uses a weak model for commit messages and chat summaries. Give it a cheaper model to save tokens:

aider --model openai/claude-sonnet-5-5 --weak-model openai/glm-5.3

Troubleshooting

Example metadata file

Values come from the live catalog, . Save the file as .aider.model.metadata.json in your home directory or the repository root.

{
  "openai/claude-sonnet-5-5": {
    "max_input_tokens": 1000000,
    "input_cost_per_token": 2.38095e-07,
    "output_cost_per_token": 1.19048e-06,
    "litellm_provider": "openai",
    "mode": "chat"
  }
}

Current prices of models for coding agents

Prices checked from the live catalog. "From" is the lowest price among the relay.fast sources that currently serve the model. The price you pay depends on the source your request uses and can change on any day. The pricing page always shows current values.

ModelModel IDOfficial input / output per 1M tokensrelay.fast from, input / outputCache read fromContext
Claude Sonnet 5.5claude-sonnet-5-5$2 / $10$0.238 / $1.19 (−88%)$0.02381M
Claude Opus 5.5claude-opus-5-5$4 / $20$0.111 / $0.556 (−97%)$0.005561M
GPT-6.1 Sol
requests above 272K input tokens cost more
gpt-6.1-sol$2 / $10$0.03 / $0.15 (−98%)$0.00151.05M
GLM-5.3glm-5.3$1.4 / $4.4$0.035 / $0.11 (−97%)$0.00651M
Kimi K3kimi-k3$3 / $15$0.15 / $0.75 (−95%)$0.0151.05M
DeepSeek V4.1 Flash
price depends on the time of day; the peak-hours price is shown
deepseek-v4.1-flash$0.3 / $1.2$0.03 / $0.12 (−90%)$0.00061M

Frequently asked questions

Why does Aider need the openai/ prefix?

Aider uses LiteLLM model names. The openai/ prefix sends the model to the OpenAI-compatible endpoint set in OPENAI_API_BASE.

Can I use Claude models in Aider?

Yes. Use openai/ plus the Claude model ID, for example openai/claude-sonnet-5-5.

Does the metadata file change my bill?

No. It only sets the context window and the cost Aider shows.