Setup guide - From DeepSeek and Aider docs
Use DeepSeek in Aider
Aider's DeepSeek page still uses the discontinued deepseek/deepseek-chat id. To use current models, use Aider's documented OpenAI-compatible path: set OPENAI_API_BASE to DeepSeek's base URL and run aider --model openai/deepseek-flash.
Last verified 4 steps4 official sources
Steps
- Step 1.
Install aider.
Terminalpython -m pip install aider-install aider-install - Step 2.
Point aider's OpenAI-compatible client at DeepSeek (Mac/Linux).
Terminalexport OPENAI_API_BASE=https://api.deepseek.com export OPENAI_API_KEY=<your DeepSeek API key> - Step 3.
Windows (restart the shell after setx).
Terminalsetx OPENAI_API_BASE https://api.deepseek.com setx OPENAI_API_KEY <your DeepSeek API key> - Step 4.
Start aider in your project, prefixing the model name with openai/.
Terminalcd /to/your/project aider --model openai/deepseek-flash
Caveats
- This combines Aider's documented OpenAI compatible API mechanism (export OPENAI_API_BASE=<endpoint>, aider --model openai/<model-name>) with DeepSeek's documented OpenAI base URL and model ids.
- Aider's DeepSeek page shows export DEEPSEEK_API_KEY=<key> and aider --model deepseek/deepseek-chat. DeepSeek's change log announced deepseek-chat would be discontinued on 2026-07-24, so that example is out of date.
- Aider warns when it is used with models it does not recognise (see https://aider.chat/docs/llms/warnings.html). Expect that warning for openai/deepseek-flash.
- DeepSeek thinking mode is on by default. Requests that include tools must pass reasoning_content back, or the API returns a 400 error.
More setup guides
Same tool, other providers
Related reading
- DeepSeek V4.1-Flash-1017: Benchmarks vs Opus 5, Pricing, Switch?DeepSeek V4.1-Flash-1017 jumps 11 points on Terminal-Bench 4.0 at the same deepseek-flash price. Benchmarks vs Opus 5, K3, GLM-5.3 and when to switch.
- DeepSeek 4.1 Flash as a Daily Coding Model: Cache, Peak Hours and LimitsDeepSeek 4.1 Flash as a daily coding model: what a session costs, how peak hours double the bill, why caching matters, and where the subsidy argument holds.
- Where to Run DeepSeek V4.1 Flash Free and CheapDeepSeek V4.1 Flash replaced V4 Flash. Official API: $0.15 input, $0.60 output off-peak. OpenRouter hosts start near $0.05. MIT weights are on Hugging Face.
- DeepSeek V4 Flash Vision Exp: Experimental Vision, Limits, and How to Run It in OpenCodeDeepSeek V4 Flash Vision Exp guide: supported image formats, three input methods, the 384-token per-image cap, and how to run it in OpenCode today.
- We Read DeepSeek Harness: What 453K Lines of Agent Runtime Actually SayDeepSeek Harness (dsh) code read: a 453K-line plugin runtime on a vendored Cordis fork, three patterns worth stealing, and the gaps the launch does not mention.
- DeepSeek V4 Flash Is 90% Off Through Novita on Vercel AI Gateway: The Cost MathDeepSeek V4 Flash via Novita on Vercel AI Gateway was 90% off for Pro customers through August 11. The before/after cost math and the provider-pinning setup.
FAQ
How do I use DeepSeek in Aider?
Aider's DeepSeek page still uses the discontinued deepseek/deepseek-chat id. To use current models, use Aider's documented OpenAI-compatible path: set OPENAI_API_BASE to DeepSeek's base URL and run aider --model openai/deepseek-flash.
Which DeepSeek model ids work in Aider?
The official docs read for this guide list deepseek-flash and deepseek-v4-pro. Requests go to https://api.deepseek.com.
Is this an official DeepSeek and Aider setup?
The steps draw on both DeepSeek's and Aider's docs. It was last checked against 4 official pages on October 17, 2026.
Sources
Last verified against 4 official pages.
- aider.chathttps://aider.chat/docs/llms/openai-compat.html
- aider.chathttps://aider.chat/docs/llms/deepseek.html
- api-docs.deepseek.comhttps://api-docs.deepseek.com/
- api-docs.deepseek.comhttps://api-docs.deepseek.com/updates
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.