Skip to main content
Aider is an open-source, terminal-based AI pair-programming tool with a large and active community. It edits your codebase directly from natural-language instructions, with full git integration.

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.
A plain pip install aider-chat into your own virtual environment also works, but it requires Python 3.10 to 3.12. On an unsupported version, pip quietly installs an older Aider release instead of reporting an error. aider-install is Aider’s own recommended path and avoids dependency conflicts with your project’s packages.
2

Change into your project directory

Aider uses git for every edit, so this should be a git repository (or run 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:
These exports replace any OpenAI credentials already set in that shell. To keep them separate, pass --openai-api-base and --openai-api-key on the command line, or put both variables in a file and load it with --env-file.
4

Run Aider with a SambaNova model

Prefix the model name with openai/:
This opens Aider’s interactive chat in your current git repository.

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:
At the prompt, describe the change you want in plain language:
Only add the files that actually need editing — Aider pulls in relevant context from the rest of the repository automatically, and adding too many files wastes tokens and can confuse the model. You can also run Aider with no files named and let it figure out what to edit from your request, or add files mid-session with the in-chat /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)
The edit is written to disk immediately and committed to git.

Register the model’s real context window

Without extra configuration, Aider doesn’t recognize MiniMax-M3 and prints:
Fix this by creating .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

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.
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.
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.
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.

Additional resources