Prerequisites
- A SambaCloud account and API key
- Python 3.9 or later (3.10 to 3.12 if you install with
pip) - A git repository to work in (Aider uses git for every edit)
Setup
1
Install Aider
Aider’s documented installation method:This installs Aider into its own isolated environment and puts the
aider command on your PATH, independent of whatever Python environment your project uses.2
Change into your project directory
git init first).3
Export your SambaCloud API key
Aider routes custom OpenAI-compatible endpoints through the
OPENAI_API_BASE and OPENAI_API_KEY environment variables:4
Run Aider with a SambaNova model
Prefix the model name with This opens Aider’s interactive chat in your current git repository.
openai/:Usage
Name the files you want Aider to edit on the command line — this “adds them to the chat” so Aider can see and modify their contents:/add command.
Every change Aider makes is committed to git automatically, so changes are easy to review and undo. If a change isn’t what you wanted, use the in-chat /undo command to revert it.
Example: a non-interactive edit
Run non-interactively against a specific file with--message, useful for scripting:
Output (abridged)
Register the model’s real context window
Without extra configuration, Aider doesn’t recognizeMiniMax-M3 and prints:
.aider.model.metadata.json in your repo root (or home directory):
.aider.model.metadata.json
With this file in place, the warning disappears and Aider’s repo map grows from the default 1024 tokens to 4096.
MiniMax-M3 has a single 1048576-token budget shared between input and output, which is why both values match. See SambaCloud models for other models’ context windows.Troubleshooting
Warning: Unknown context window size and costs, using sane defaults
Warning: Unknown context window size and costs, using sane defaults
Aider has no built-in metadata for SambaNova models. Add a
.aider.model.metadata.json file as shown above — see Register the model’s real context window.Model responds, but edits aren't applied
Model responds, but edits aren't applied
Confirm you passed the target file(s) as arguments (or added them inside the interactive chat) — Aider only edits files that are in the chat’s file list.
command not found: aider, or ModuleNotFoundError
command not found: aider, or ModuleNotFoundError
If you used
aider-install, confirm the installer finished and its install location is on your PATH. If you installed with pip install aider-chat directly, confirm pip install aider wasn’t used instead — that’s a different, unrelated package — and that your virtual environment is active.Authentication error or 401
Authentication error or 401
Confirm both
OPENAI_API_BASE and OPENAI_API_KEY are exported in the same shell session Aider runs in: echo $OPENAI_API_BASE and echo $OPENAI_API_KEY.
