LM Warden

Aider on your own GPUs.

Aider on a served model through its OpenAI-compatible provider.

Where a request from Aider goes Aider sends its requests to LM Warden with OPENAI_API_BASE set to the warden and OPENAI_API_KEY holding a warden key. LM Warden checks the key, speaks OpenAI Chat Completions, queues the request by key priority and hands it to the replica router, which keeps each session on the replica that already holds its cache, one model copy per GPU. Aider OPENAI_API_BASE the warden, at /v1 OPENAI_API_KEY vw_…, the warden key POST /v1/chat/completions LM Warden checks the key: one per app speaks OpenAI Chat Completions scheduler, key priority usage, latency and live stats per key Replica router a session goes back to the replica that holds its cache one model copy per GPU your GPUs: vLLM or llama.cpp replica 0, GPU 0 replica 1, GPU 1 replica 2, GPU 2 a conversation stays on its replica
Where a request from Aider goes Aider sends its requests to LM Warden with OPENAI_API_BASE set to the warden and OPENAI_API_KEY holding a warden key. LM Warden checks the key, speaks OpenAI Chat Completions, queues the request by key priority and hands it to the replica router, which keeps each session on the replica that already holds its cache, one model copy per GPU. Aider OPENAI_API_BASE the warden, at /v1 OPENAI_API_KEY vw_…, the warden key POST /v1/chat/completions LM Warden checks the key: one per app speaks OpenAI Chat Completions scheduler, key priority usage, latency, live stats per key Replica router a session goes back to the replica that holds its cache replica 0 GPU 0 replica 1 GPU 1 replica 2 GPU 2 your GPUs: vLLM or llama.cpp a conversation stays on its replica
Where a request from Aider goes: the two settings Connect writes, the warden in the middle, then one copy of the model per GPU.

In words: Aider sends its requests to LM Warden with OPENAI_API_BASE set to the warden and OPENAI_API_KEY holding a warden key. LM Warden checks the key, speaks OpenAI Chat Completions, queues the request by key priority and hands it to the replica router, which keeps each session on the replica that already holds its cache, one model copy per GPU.

Protocol
OpenAI Chat Completions
Support
Local models only

Local models only, over Chat Completions. Aider edits through text formats, so the model needs no tool calling. The metadata file only stops Aider warning about an unknown model and sets its context size.

Requirements

  • Works best with at least 32,768 tokens of context.

Setup

In the console, Connect writes these files with your warden’s address, your key and the model you picked. Here they are with placeholders.

Local models

Point Aider’s OpenAI provider at this warden.

Shell
export OPENAI_API_BASE=https://your-warden/v1
export OPENAI_API_KEY=vw_YOUR_KEY
aider --model openai/your-served-model-name
.aider.model.metadata.json (.aider.model.metadata.json)
{
  "openai/your-served-model-name": {
    "max_input_tokens": 32768,
    "max_output_tokens": 8192,
    "max_tokens": 8192,
    "input_cost_per_token": 0,
    "output_cost_per_token": 0,
    "litellm_provider": "openai",
    "mode": "chat"
  }
}
Session id per launch (optional)
# Run this instead of `aider ...`: it writes a fresh session id per launch.
SID=$(python3 -c 'import uuid; print(uuid.uuid4())')
cat > .aider.model.settings.yml <<EOF
- name: openai/your-served-model-name
  extra_params:
    extra_headers:
      X-Session-Id: $SID
EOF
aider --model openai/your-served-model-name

Official documentation: https://aider.chat/docs/llms/openai-compat.html (read 2026-10-04).