Aider through Nexus Gateway
Read this first
- Nexus has no launcher for Aider. You set two variables in your terminal, and Aider sends its calls to Gateway's OpenAI compatible API,
/v1/chat/completions, with a Nexus API key: reserved, metered, checked against your organization's policy and attributed to you. - Gateway cannot tell Aider's calls from any other call on that key.
nexus spendlists them under Nexus Gateway, direct API calls (core), not underagents, and no agent session groups them. - These calls run on a provider key your person, team or organization stored. Nexus credit never pays for them: without a key, Gateway refuses the call with
403. - Aider writes the model as
openai/followed by Gateway's model id, soopenai/gpt-6-lunabecomesopenai/openai/gpt-6-luna.nexus modelslists the ids you may use. A call that names no output limit reserves the model's own, so name a small model. - The API key works until you revoke it in Nexus UI, and anyone holding it spends as you. Keep it out of files and shell history.
Set up and run
-
Install the nexus CLI. It needs Node.js 22.6 or later and curl. If the installer says its folder is not on your PATH, add the line it prints to your shell's profile, then open a new terminal.
curl -fsSL https://api.nexus.inc/install.sh | bash -
Sign in to Nexus and approve the code in Nexus UI. The code expires after ten minutes.
nexus auth login -
In Nexus UI, open Settings, then Keys, and create a key named
aider. It is shown once: copy it. -
Install Aider with its own installer. Nexus never installs it for you. If
aideris not found afterwards, open a new terminal.curl -LsSf https://aider.chat/install.sh | sh -
Owner or admin. If
nexus keys listshows no OpenAI key, add the organization's key, once.nexus keys add openai <key> -
Point Aider at Gateway for this terminal only. After the second line, paste the API key and press Enter: nothing shows, and the key stays out of your shell history.
export OPENAI_API_BASE=https://api.nexus.inc/v1 read -rs OPENAI_API_KEY && export OPENAI_API_KEY -
Run one prompt through Gateway on a small model. It runs from any folder.
aider --model openai/openai/gpt-6-luna --no-git --yes-always --message "Reply with the single word pong"
Check it worked
The call shows in your spend under Nexus Gateway, direct API calls, and first in its recent calls.
nexus spendWhat Nexus changes for the run
Nexus changes nothing on your computer. You set OPENAI_API_BASE to your Gateway's /v1 and OPENAI_API_KEY to your Nexus API key, in one terminal only, and Aider sends its calls there. To go back, close that terminal or run unset OPENAI_API_BASE OPENAI_API_KEY, and revoke the key in Nexus UI when you no longer use it.
How it is tested
- One prompt through Gateway's
/v1/chat/completionsby the steps above, recorded innexus spendunder direct API calls
| Run | Date | Aider | nexus | First call | Steps skipped | Result |
|---|---|---|---|---|---|---|
| aider-2026-10-28-1 | 2026-10-28 | 0.86.2 | 0.14.0+69e1c09 | 5m 47s | provider_key | pass |
Each run is a record in eng/factory/kit/recipes/runs/, with its steps' times, the call and what got in the way.