Docs / Connect

Connect → aider

Use AxForge with aider

aider is an AI pair- programmer that edits code in your terminal. It routes model calls through LiteLLM, so you point it at AxForge with the OpenAI environment variables and an openai/ model prefix.

Get aider

aider is a terminal program, installed from PyPI:

$ python -m pip install aider-chat

Then run aider inside a git repository — it works on the repo you are standing in. Full options: aider.chat.

Configure

$ export OPENAI_API_BASE=https://api.axforge.ai/v1
$ export OPENAI_API_KEY=your-axforge-key
$ aider --model openai/qwen3.8-27b-nvfp4

Or pass them as flags instead of env vars:

$ aider --openai-api-base https://api.axforge.ai/v1 \
      --openai-api-key your-axforge-key \
      --model openai/qwen3.8-27b-nvfp4

The openai/ prefix is required. It tells aider's LiteLLM layer to treat the model as a generic OpenAI-compatible endpoint. Without it, aider tries to match the bare name against known hosted providers and fails.

Notes

  • For a model aider does not recognise, set its context window in a .aider.model.settings.yml so aider sizes the conversation correctly.
  • Use a coding-strong model — the agentic role (which maps to qwen3.8-27b-nvfp4) is a good default; see Models.

Where to put this

The two exports above only last for the terminal you typed them in. For something permanent, pick one:

WhereGood for
Your shell profile — ~/.bashrc, ~/.zshrc, or on Windows $PROFILEEvery project, every new terminal
.env beside the repoOne project. aider reads it, and it keeps the key out of your shell history
~/.aider.conf.ymlaider's own settings file, when you also want to pin the model and other options

On Windows, export is not a command — $env:OPENAI_API_BASE = "https://api.axforge.ai/v1" in PowerShell, or set OPENAI_API_BASE=https://api.axforge.ai/v1 in cmd.

Check that it worked

Two things, and the second is the one that proves it end to end:

  1. aider prints the model on the line it starts with — you should see openai/chat, not a Moonshot or OpenAI default.
  2. Ask it something small (what files are in this repo?) and the answer arrives rather than an error.
  3. The call appears in the console at Billing & usage within a minute or two. Nothing else confirms that your key reached our API — a reply alone could be a cache or another provider.

When it does not work

What you seeWhat it meansFix
Model not found or aider offers a pickerthe openai/ prefix is missing, so aider looked up a model that is not oursthe model must be written openai/chat, prefix included
401the keycheck OPENAI_API_KEY is exported in the shell you actually ran aider in — a new terminal does not have it
It answers but edits nothingthat is aider working normally; it asks before writingnot a connection problem

Run the self-test first when you are unsure — it says in one click whether the problem is your key, your quota or us, so you know whether the tool is worth debugging at all.

Anything unclear on this page?

Ask on the forum — the answer helps the next person too.

Ask about this page
© 2026 AxForge · EU-hosted AI infrastructure Docs Models For AI axforge.ai Pricing Trust Acceptable use Community guidelines