Skip to content

DocsCoding agents

Aider

Pair-program with Aider on your own Osarai GPU through its OpenAI-compatible model support, with the context window set in a metadata file.

Aider is a pair-programming tool for the terminal that edits files in your git repository and commits each change. It reaches Osarai through its OpenAI-compatible model support (model names start with openai/).

Aider answering on qwen3.8-27b served by Osarai
Aider running on an Osarai instance.

Install

Terminal
python -m pip install aider-install
aider-install

Aider runs on Python 3.10 to 3.12; the installers above pick a suitable Python for you.

Configure

Aider reads the key and base URL from the environment:

Terminal
export OPENAI_API_KEY="$OSARAI_API_KEY"
export OPENAI_API_BASE="https://osarai.xyz/v1"

To keep the settings with a project, add .aider.conf.yml at the root of the repository (or in your home directory for every project):

.aider.conf.yml
model: openai/qwen3.8-27b
weak-model: openai/qwen3.8-27b
openai-api-base: https://osarai.xyz/v1

Aider does not know open models' limits. Tell it the real context window in .aider.model.metadata.json, next to the file above:

.aider.model.metadata.json
{
  "openai/qwen3.8-27b": {
    "max_input_tokens": 131072,
    "max_output_tokens": 16384,
    "input_cost_per_token": 0,
    "output_cost_per_token": 0,
    "litellm_provider": "openai",
    "mode": "chat"
  }
}

The costs are zero because you pay for the GPU by the hour, not per token.

Run

Terminal
cd your-project
aider

Without .aider.conf.yml, name the model on the command line:

Terminal
aider --model openai/qwen3.8-27b

The header shows Model: openai/qwen3.8-27b. Add files to the chat with /add src/math.ts, then ask for a change. To send one message and exit:

Terminal
aider --message "Add a multiply function to src/math.ts" src/math.ts

Edit format

For models it does not know, Aider asks for whole files back (whole edit format). That is reliable but slow on large files; qwen3.8-27b also handles search-and-replace edits:

Terminal
aider --model openai/qwen3.8-27b --edit-format diff

Troubleshooting

SymptomFix
Unknown context window size and costs, using sane defaultsAdd .aider.model.metadata.json as above
AuthenticationError / 401OPENAI_API_KEY is not your qck_… key in the shell that started Aider
NotFoundError on /chat/completionsOPENAI_API_BASE must end with /v1
LLM Provider NOT providedKeep the openai/ prefix on the model name: it tells Aider which API to use
503 … not ready yetThe instance is still starting; wait for Ready on the instance page