Viro API

Integrations / Aider

Aider

Aider connects to any OpenAI-compatible endpoint through two environment variables. There is no config file to write and no provider to register — but the model name has a wrinkle worth reading before you start.

Status: unverified. The setup below follows Aider's documented OpenAI-compatible path, but we have not yet run a live Aider session against Viro ourselves. The model-metadata section in particular is our reading of Aider's docs applied to Viro's namespaced slugs, not something we've confirmed end to end.
Configure

Install Aider, then point it at Viro:

python -m pip install aider-install
aider-install

# Mac/Linux
export OPENAI_API_BASE=https://api.viro.app/v1
export OPENAI_API_KEY=<your-viro-key>

# Windows (restart your shell afterwards)
setx OPENAI_API_BASE https://api.viro.app/v1
setx OPENAI_API_KEY <your-viro-key>

Get a key from API Keys. These are the standard OpenAI variables — if you already use them for OpenAI proper, set them per project rather than globally, or Aider will pick up whichever was exported last.

The double prefix

Aider routes by a provider prefix on the model name, so an OpenAI-compatible endpoint needs openai/ in front. Viro's slugs already carry their own namespace. Both survive:

cd /to/your/project

aider --model openai/viro/optimized
aider --model openai/anthropic/claude-sonnet-5
aider --model openai/viro/deepseek-v4-pro

The leading openai/ is consumed by Aider's routing layer and stripped before the request leaves your machine, so the model that actually reaches us is the real slug — viro/optimized, not openai/viro/optimized. It looks wrong and is correct. Dropping it is the most common failure here: without the prefix Aider doesn't know to use the OpenAI-compatible path at all.

Aider uses a second, cheaper model for commit messages and summaries. Point it at something small rather than paying router or frontier rates for a one-line commit message:

aider --model openai/viro/frontier --weak-model openai/viro/gpt-oss-20b
The warning you can ignore

On first run you'll see something like:

Model openai/viro/optimized: Unknown context window size and costs, using sane defaults.

This is expected for any model Aider hasn't shipped metadata for, which is every Viro slug. Aider never enforces token limits itself — it only reports limit errors returned by the API — so the practical effect is that its cost estimate reads zero. Your real spend is on Usage.

To silence it, create .aider.model.metadata.json in your home directory, repo root, or working directory. Real context windows and prices are on the Models page:

{
  "openai/viro/optimized": {
    "max_input_tokens": 128000,
    "max_output_tokens": 16384,
    "input_cost_per_token": 0.0000006,
    "output_cost_per_token": 0.0000024,
    "litellm_provider": "openai",
    "mode": "chat"
  }
}

The key must match the string you pass to --model exactly, including the openai/ prefix, and litellm_provider should match that prefix. The prices above are an example, not a quote — check Pricing for current rates.

Worth changing: edit format

For models it doesn't recognize, Aider falls back to the whole edit format — the model rewrites each file in full rather than emitting a diff. It works, but on a large file it costs many times more output tokens than necessary, and every one of those tokens is billed.

If your model handles diffs well (frontier models generally do), set it in .aider.model.settings.yml, in the same locations as the metadata file:

- name: openai/anthropic/claude-sonnet-5
  edit_format: diff
  use_repo_map: true
  weak_model_name: openai/viro/gpt-oss-20b

Try it on a small change first. A model that emits malformed diffs will fail loudly and repeatedly, at which point whole is the right trade.