Knowledge Base Sections ▾

Navigation

▸ Start here By roles

Categories

Tools 52
Glossary 12

Tools

Aider + Gonka AI - pair programming with AI

Aider is one of the best terminal AI coding assistants. It works with Git, understands your project structure, creates commits, and edits multiple files at once. It's not just a chat with AI — it's full-fledged pair programming where your AI partner reads your code, suggests changes and applies them.

Aider supports OpenAI-compatible APIs out of the box. Connecting to the JoinGonka Gateway takes three lines in the config file and 30 seconds to set up. After that — unlimited pair programming for $0.0069/1M tokens.

Step 1: Install Aider and get key

Installing Aider:

# pip
pip install aider-chat

# pipx (recommended)
pipx install aider-chat

# Homebrew (macOS)
brew install aider

API key: sign up at gate.joingonka.ai/register, get 3M free tokens, create a jg-xxx key.

Step 2: Configure Aider

The easiest way to get a ready-made config block is with the JoinGonka installer:

npx @joingonka/setup --tool aider

The installer will ask for your jg-… key and print a block for .aider.conf.yml (address, key, model), plus an optional .aider.model.metadata.json with the model's real limits so Aider won't warn about an unknown context window. It doesn't write the files — paste the block in yourself; the installer verifies the key and model with a live request to the gateway. Below is the same path, step by step.

Set up manually (Plan B)

Method 1: environment variables — for a single session in the current terminal. Don't add them to ~/.bashrc: a global OPENAI_* would hijack your other OpenAI-compatible tools. In PowerShell, set the same variables with $env:.

export OPENAI_API_BASE=https://gate.joingonka.ai/v1
export OPENAI_API_KEY=jg-your-key

Launch:

aider --model openai/MiniMaxAI/MiniMax-M2.7

Method 2 (recommended): the file .aider.conf.yml in the project root — the most native path: endpoint, key and model in one file, without touching global environment variables (a global OPENAI_* would hijack your other OpenAI-compatible tools):

# .aider.conf.yml
openai-api-base: https://gate.joingonka.ai/v1
openai-api-key: jg-your-key
model: openai/MiniMaxAI/MiniMax-M2.7

Optionally, fine-tune model behavior in a separate .aider.model.settings.yml (it sets ONLY model parameters, not the endpoint or key):

# .aider.model.settings.yml
- name: openai/MiniMaxAI/MiniMax-M2.7
  edit_format: diff
  use_repo_map: true
  extra_params:
    max_tokens: 8192  # Gateway output cap

Aider reads the model's real limits from the .aider.model.metadata.json file next to the config — without it, it warns about an unknown context window:

{ "openai/MiniMaxAI/MiniMax-M2.7": { "max_input_tokens": 200000, "max_output_tokens": 8192,
    "max_tokens": 8192, "litellm_provider": "openai", "mode": "chat" } }

Method 3: a shell alias for convenience:

alias gonka-aider='OPENAI_API_BASE=https://gate.joingonka.ai/v1 OPENAI_API_KEY=jg-your-key aider --model openai/MiniMaxAI/MiniMax-M2.7'

Verification: go to a Git repository and run gonka-aider. Aider will show model info and offer to add files to the context. Ask it to make a change to a file — if Aider creates a commit, everything works.

Aider + Gonka capabilities

Aider is not just a chat. It is a full-fledged AI-powered pair programming tool:

  • Git integration: Aider automatically creates commits for every change. It's easy to rollback any AI decision via git undo.
  • Project context: Aider builds a repository map (repo map) — it understands dependencies between files, imports, and project structure. The model receives full context.
  • Multi-file edits: can modify 5-10 files simultaneously to implement a feature. Each file is a separate diff, each edit is tracked.
  • Voice input: --voice support — dictate tasks instead of typing.
  • Linting and tests: integration with linters and test frameworks — Aider sees errors and fixes them automatically.

With Gonka, all this costs pennies. A typical pair programming session (2-4 hours) consumes 10-30M tokens — that's $0.01-0.03 via JoinGonka Gateway. With OpenAI, it's $50-200 for the same session.

Alternative terminal tools: Claude Code, OpenCode.

Model parameters: MiniMax M2.7 context window is 200K tokens, DeepSeek V4 Flash is 380K; max response length via Gateway is 8192 tokens for MiniMax M2.7 and GLM-5.3 Flash, and 32768 for DeepSeek V4 Flash. For most pair programming tasks, this is sufficient.

Aider + Gonka = professional AI-powered pair programming for pennies. Git integration, multi-file edits, project context — all for $0.01-0.03/session instead of $50-200 at OpenAI.

Want to learn more?

Explore other sections or start earning GNK right now.

Get free tokens →