Skip to Content

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

After 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/dashboard

Specify the model with the openai/ prefix to tell Aider to use the OpenAI-compatible channel:

aider --model openai/gpt-5.4

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

Model Selection

Common models (all need the openai/ prefix):

  • openai/claude-sonnet-5 - Balanced default, good for everyday coding
  • openai/gpt-5.4 - General workhorse
  • openai/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 /ask to ask without changing code, and /code to let it edit directly
  • Aider creates a Git commit for each change, making rollback easy
Last updated on