aider is the terminal-based, git-aware AI pair programmer, and it connects to any OpenAI-compatible endpoint. Pointing it at GLM-5.2 or DeepSeek through Turiloop takes two environment variables and one prefix.
The setup
Set the endpoint and key, then launch aider with the model. The one detail that trips people up: aider needs the openai/ prefix on the model name so it routes through the OpenAI-compatible path.
export OPENAI_API_BASE=https://api.turiloop.com/v1
export OPENAI_API_KEY=YOUR_TURILOOP_KEY
aider --model openai/glm-5.2For DeepSeek, swap the model:
aider --model openai/deepseek-v4-proYou can also put these in ~/.aider.conf.yml (openai-api-base, openai-api-key, model) so you do not retype them.
Which model for aider
aider edits real files and runs against your git history, so correctness matters more than raw speed:
- `openai/glm-5.2` — the best default. 62.1 on SWE-bench Pro, 1M context to hold multiple files, strong at the diff-style edits aider produces (deep dive).
- `openai/deepseek-v4-pro` — for algorithm-heavy changes (93.5 on LiveCodeBench).
- `openai/deepseek-v4-flash` — for small, cheap edits at volume.
Why Turiloop
Turiloop is an OpenAI-compatible API gateway with one key for GLM-5.2, DeepSeek, Kimi and MiniMax, billed pay-as-you-go with an international card and no Chinese phone number. Because aider only needs an OpenAI-compatible base URL, no plugin or wrapper is involved. See one key, every model.
FAQ
How do I use DeepSeek with aider? Set OPENAI_API_BASE=https://api.turiloop.com/v1 and OPENAI_API_KEY, then run aider --model openai/deepseek-v4-pro.
Why the openai/ prefix? It tells aider to use its OpenAI-compatible client for a custom endpoint. Without it, aider tries to resolve the bare name against known providers and fails.
Does GLM-5.2 work with aider's diff editing? Yes — its coding strength and long context suit aider's whole-file and diff edit formats.
Is it cheaper than running a frontier model? Considerably; see the pricing breakdown.
Create a key on Turiloop, export the two variables, and run aider with openai/glm-5.2.