Aider
Last updated
Aider connects to any OpenAI-compatible endpoint via a single environment variable: no plugin, no config file required (though both are supported too). Point that variable at Tempr Gateway and every model on your allowlist is one --model flag away, under one key, instead of juggling a separate API key per provider.
-
Create a virtual key
In the Portal, create a Gateway virtual key. Keys are prefixed
tvk_and shown once at creation. -
Add a provider key
Gateway is BYOK: add a key for at least one provider from the supported list.
-
Set the environment variables
Before running
aider:
# Mac/Linux
export OPENAI_API_BASE="https://api.temprhq.io/v1"
export OPENAI_API_KEY="tvk_..."
# then run aider with a model on your allowlist
aider --model openai/anthropic/claude-sonnet-4-5
Aider expects OpenAI-compatible models to be prefixed with openai/ in its own --model flag (this is Aider's own provider-routing prefix, on top of Tempr's own provider/model id). The example above requests Tempr's anthropic/claude-sonnet-4-5 through that openai/ passthrough.
That model needs an Anthropic key in the Portal; with another provider's key, use one of its models, or any model from GET /v1/models.
To avoid exporting variables every session, set openai-api-base and openai-api-key in a YAML config file or a project .env (AIDER_OPENAI_API_BASE/OPENAI_API_KEY) instead.
On a coding plan
Tempr serves each coding plan only to the tools its vendor allows, and recognises a tool by the identity it sends. Aider sends only a generic identity to a custom endpoint, so Tempr can't tell it from a script, and a plan limited to the tools its vendor names, or to coding tools Tempr recognises (Z.AI, Kimi, Alibaba, Tencent, KUAE and others), refuses it with a plan_tool_not_allowed error. Aider can use the plans that accept any tool: MiniMax, StepFun, Synthetic, Ollama Cloud, NanoGPT, Fire Pass and ClinePass. Name the model by the plan: minimax-plan/MiniMax-M3.1-Flash-Preview. Tempr can get the plan's key two ways:
- Stored in Tempr. Add the plan's key under Provider keys in the Portal, and keep Aider's settings as they are, with your virtual key.
- Sent with each request. Pass the plan's key as
--openai-api-keyand send your virtual key as an extra header from.aider.model.settings.yml, then run Aider with--model openai/minimax-plan/MiniMax-M3.1-Flash-Preview: Tempr sends the plan's key only to that plan, and never stores it. An organization's keys take a key sent this way once an owner or admin turns on Plan logins.
- name: aider/extra_params
extra_params:
extra_headers:
x-tempr-key: tvk_...
Several plans are sold only for the coding tools they support, and some refuse other tools, telling them apart by the identity each tool sends. Tempr passes Aider's own along and never sends another, so check which tools each plan supports before you subscribe.
What's next
- Authentication & virtual keys: scoping keys with model allowlists, budgets, and rate limits.
- Models, limits & logs: request logs and analytics for everything you send through the gateway.