Short answer. Set
OPENAI_API_BASEtohttps://api.plugsky.com/v1andOPENAI_API_KEYto your key, then launch Aider with--model openai/plugsky-coder. Put the stable options in.aider.conf.yml, keep the secret in.env, and pick an edit format the model can follow. Aider will warn that it does not recognize the model; that warning is about missing metadata, not a broken connection.
Point Aider at the endpoint
Aider selects a provider from the model name. The openai/ prefix tells it to use the OpenAI-compatible client, which reads OPENAI_API_BASE and OPENAI_API_KEY. Without the prefix, Aider may try a different provider and ignore your base URL.
# .env in the repository root
OPENAI_API_BASE=https://api.plugsky.com/v1
OPENAI_API_KEY=your-key-here
cd ~/src/my-service
aider --model openai/plugsky-coder
Do not commit .env. Aider loads it from the git root, so add it to .gitignore before the first run. If you prefer environment variables, export them in the shell instead; the effect is the same.
Put repeatable settings in .aider.conf.yml
Command-line flags are fine for a one-off, but a repository-level config keeps a team consistent. Aider's default file is .aider.conf.yml (often shortened to "config.yml" in examples). It reads the file from the home directory, the git root and the current directory, in that order, with later files taking priority.
# .aider.conf.yml
model: openai/plugsky-coder
weak-model: openai/plugsky-coder-fast
openai-api-base: https://api.plugsky.com/v1
edit-format: diff
map-tokens: 8192
map-refresh: auto
cache-prompts: false
alias:
- "fast:openai/plugsky-coder-fast"
- "deep:openai/plugsky-coder-ultra"
| Key | What it does | Recommended starting point |
|---|---|---|
model | Main chat model | openai/plugsky-coder |
weak-model | Commit messages and summaries | openai/plugsky-coder-fast |
openai-api-base | Compatible endpoint | https://api.plugsky.com/v1 |
edit-format | How the model returns edits | diff for coder models |
map-tokens | Repo-map budget | 8,192 for a medium repository |
cache-prompts | Provider prompt caching | Leave off until the endpoint proves support |
Model aliases and the unknown-model warning
Aider ships metadata for many public models. A custom ID such as openai/plugsky-coder is not in that list, so Aider warns that it cannot find context-window or pricing data. The request still works. Use aliases to keep commands short and to standardize model choice across a team:
aider --alias "fast:openai/plugsky-coder-fast" \
--alias "deep:openai/plugsky-coder-ultra"
Then /model fast or aider --model deep selects the alias. If the warning becomes noise, set show-model-warnings: false in the config, but only after you have confirmed the connection and the model's real context window. Suppressing a warning is not the same as supplying metadata.
Pick an edit format
Aider asks the model to return edits in a specific format, then applies them to your files. The format has a larger effect on success than a few points of model quality.
| Format | How it works | Best for | Trade-off |
|---|---|---|---|
diff | Search/replace blocks | Most coder models | Fails when the search block is ambiguous. |
whole | Rewrites the entire file | Small files and weak edit models | Expensive and slow on large files. |
udiff | Unified diff | Models trained on patch format | Less forgiving of context drift. |
architect | One model plans, another edits | Large changes | Two calls and more coordination. |
Start with diff and a small task. If Aider reports that it could not apply an edit, switch to whole for that file rather than repeating the same failing prompt.
Tune the repo map, not just the context window
Aider builds a tree-sitter repo map that ranks the files and symbols most relevant to the request. That map is often more valuable than stuffing the full context window. map-tokens controls its budget; map-refresh controls when it is rebuilt.
A 262,144-token model can hold a lot, but every token is billed and long prompts degrade instruction-following. Start with 8,192 map tokens, add the files you are actually changing, and let Aider retrieve the rest. If the model loses track of a symbol, add that file explicitly rather than doubling the map budget.
Use /tokens to see the current request size. Aider can show a cost estimate in its startup banner when it has pricing metadata; for a custom model it may have none, so reconcile spend against the provider's usage page.
Benchmarks and cost
Aider publishes public leaderboards for code editing and refactoring. They are useful for a shortlist, not a guarantee: the scores depend on the edit format, the benchmark harness and the model version. Do not copy a leaderboard number into a buying decision without running a small evaluation on your own repository.
A practical evaluation is ten tasks you already know how to solve, each with a failing test. Measure whether the edit applies, whether the test passes, and how many tokens it took. That tells you more than a single aggregate score. Keep auto-commits on so every change is recoverable, and review the diff before you keep it.
For the agent design questions, see what to look for in a terminal coding agent, build an AI coding agent, and pricing.
FAQ
Does Aider work with any OpenAI-compatible endpoint?
Yes, if the endpoint implements the OpenAI chat completions API. Set OPENAI_API_BASE and OPENAI_API_KEY, and prefix the model name with openai/ so Aider selects the compatible client.
What model name should I use?
Use openai/ followed by the exact model ID, for example openai/plugsky-coder. The openai/ prefix is what routes the request to the compatible endpoint.
Why does Aider warn about an unknown model?
Aider has no built-in context-window or pricing metadata for that model ID. The warning does not mean the connection failed; you can supply metadata or suppress the warning after verifying the model.
Which edit format should I use?
Start with diff for coder models. Use whole for small files or models that struggle with search/replace blocks, and udiff for models trained on patch format.
How do I control Aider's cost?
Keep the repo map modest, add only relevant files, reset the chat when the task changes, and check /tokens during the session and the provider's usage page afterward.
Sources checked 20 November 2026: Aider OpenAI-compatible APIs; Aider YAML config; Aider edit formats; Aider repo map. Product behavior, endpoint support and plan limits can change; re-check the primary documentation before production rollout.