# aider


    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:

      | Where | Good for |  |

        | Your shell profile — `~/.bashrc`, `~/.zshrc`, or on
        Windows `$PROFILE` | Every project, every new terminal |  |

        | `.env` beside the repo | One project. aider reads it, and
        it keeps the key out of your shell history |  |

        | `~/.aider.conf.yml` | aider'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:

      - aider prints the model on the line it starts with — you should see `openai/chat`, not a Moonshot or OpenAI default.
- Ask it something small (`what files are in this repo?`) and the answer arrives rather than an error.

      - 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 see | What it means | Fix |  |

        | `Model not found` or aider offers a picker | the `openai/` prefix is missing, so aider looked up a model that is not ours | the model must be written `openai/chat`, prefix included |  |

        | `401` | the key | check `OPENAI_API_KEY` is exported in the shell you actually ran aider in — a new terminal does not have it |  |

        | It answers but edits nothing | that is aider working normally; it asks before writing | not 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.

      &larr; Vercel AI SDK
      Continue &rarr;



Source: https://axforge.ai/docs/connect/aider/
