Using with Aider - MyTokenGate
Aider is an AI pair-programming tool that runs in your terminal, reads and writes your local codebase, and commits to Git automatically. It connects to models over the OpenAI-compatible API, so it works directly with MyTokenGate.
Install Aider
python -m pip install aider-chatAfter installation, run aider inside your project directory to start.
Configure MyTokenGate
Aider connects to a third-party gateway through the OpenAI-compatible variables. Add to your shell profile:
export OPENAI_API_BASE="https://gateway.mytokengate.com/v1"
export OPENAI_API_KEY="your-api-key-here" # Get it from https://mytokengate.com/app/dashboardSpecify the model with the openai/ prefix to tell Aider to use the OpenAI-compatible channel:
aider --model openai/gpt-5.4You can also put the config in .aider.conf.yml at the project root:
openai-api-base: https://gateway.mytokengate.com/v1
openai-api-key: your-api-key-here
model: openai/gpt-5.4Model Selection
Common models (all need the openai/ prefix):
openai/claude-sonnet-5- Balanced default, good for everyday codingopenai/gpt-5.4- General workhorseopenai/claude-opus-4-8- Complex refactors and architecture- See more at Model List
Usage Tips
- Use
/add <file>to bring relevant files into context instead of loading the whole repo - Use
/askto ask without changing code, and/codeto let it edit directly - Aider creates a Git commit for each change, making rollback easy
Related Links
Last updated on