Documentation / Connect

Connect → aider

Use AxForge with aider

aider pair-programs with you in the terminal: you ask, it edits the files in your git repository and commits each change. Two environment variables point it at AxForge.

Before you start
  • An AxForge API key. Get one (a minute).
  • Python 3.10 to 3.12 and a project in git. This guide was tried with aider 0.86.2 on 2026-10-17.

Set it up

  1. Install aider

    python -m pip install aider-chat
  2. Point it at AxForge

    export OPENAI_API_BASE=https://api.axforge.ai/v1
    export OPENAI_API_KEY="orx_live_your_key_here"

    aider sends OpenAI-style requests to OPENAI_API_BASE with the key in OPENAI_API_KEY. Both last until you close this terminal.

  3. Tell aider the model's size

    aider knows the sizes of well-known models only. Create ~/.aider.model.metadata.json (on Windows %USERPROFILE%\.aider.model.metadata.json):

    {
      "openai/qwen3.8-27b": {
        "max_input_tokens": 262144,
        "max_output_tokens": 16384,
        "litellm_provider": "openai",
        "mode": "chat"
      }
    }

    Our models read 262,144 tokens at once; with this, aider counts against that and does not warn about an unknown model. Add an entry the same way for openai/glm-5.3-flash or openai/mimo-v2.6-flash if you use them.

  4. Start it in your project

    cd my-project
    aider --model openai/qwen3.8-27b utils.py

    The openai/ in front of the model name tells aider to use the OpenAI-style address above. The file names at the end go into the chat.

    The aider metadata file with max_input_tokens 262144, then aider 0.86.2 started with the model openai/qwen3.8-27b and utils.py added to the chat
  5. Give it a task

    Ask in plain words. aider edits the file and commits the change to git.

    aider adding a function is_even to utils.py and committing the change

The settings

SettingValue
OPENAI_API_BASEhttps://api.axforge.ai/v1
OPENAI_API_KEYyour AxForge key
--modelopenai/qwen3.8-27b, openai/glm-5.3-flash or openai/mimo-v2.6-flash
max_input_tokens (in the metadata file)262144

Which model for what: qwen3.8-27b is the everyday default and reads images, glm-5.3-flash thinks before it answers, mimo-v2.6-flash is the fastest.

Check that it works

aider's header names openai/qwen3.8-27b and a task ends in a commit. The calls show in the console under API Keys → Recent calls within a minute.

When it does not work

Not sure which it is? The connection doctor makes seven small checks on your key and names the fix: irm https://dev.axforge.ai/assets/axforge-doctor.ps1 | iex in PowerShell, curl -fsSL https://dev.axforge.ai/assets/axforge-doctor.sh | bash on macOS and Linux.

What you seeWhat it meansFix
"The api_key client option must be set"OPENAI_API_KEY is not set in this terminalset both variables as in step 2, in the same terminal
"Invalid API key. Create one at https://console.axforge.ai/keys."the key was refusedpaste it again, whole, or make a new one

Test a call says in one click whether a problem is your key, your balance or us.

Ask on the forum Markdown For AI Updated 2026-11-06

Anything unclear on this page?

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

Ask about this page