Skip to Content
ModelWorks logoModelWorks
AdaptorsOpenAI SSE Adaptor

Connect Aider

Route Aider to any ModelWorks circuit for AI pair programming via the OpenAI SSE adaptor.

Connect Aider to ModelWorks

Aider is an AI pair programmer in your terminal with 50K+ GitHub stars. This guide shows you how to connect Aider to any circuit on ModelWorks.

Prerequisites

Step 1: Get your adaptor URL

Every circuit with an OpenAI SSE adaptor exposes a URL like:

Text
https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxxxxxxxxxx/query

Step 2: Configure Aider

Aider supports OpenAI-compatible providers. Start it with custom flags:

Bash
aider \
  --openai-api-base https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxx/query \
  --openai-api-key mw_YOUR_API_KEY \
  --model glm-53-abliterated

Or set environment variables:

Bash
export OPENAI_API_BASE=https://modelworks.ai/api/circuit-adaptors/ca-xxxxxxxxx/query
export OPENAI_API_KEY=mw_YOUR_API_KEY
aider --model glm-53-abliterated

Step 3: Pair program

Aider connects to your ModelWorks circuit. Type your request and Aider will generate code, edit files, and commit — powered by your ModelWorks circuit.

Troubleshooting

IssueFix
Unknown modelAider validates model names against OpenAI's list. Pass --no-verify-model to skip.
401 UnauthorizedGenerate a new API key from Settings → Security Tokens.
402 Payment RequiredFund your wallet at modelworks.ai/settings/wallet.
On this page

On this page

© 2026 ModelWorks. All rights reserved.