Setup guide - From DeepSeek and OpenCode docs
Use DeepSeek in OpenCode
OpenCode has a built-in DeepSeek provider, and both DeepSeek's integration guide and OpenCode's provider docs describe the same setup: /connect, choose DeepSeek, paste your API key, then pick a DeepSeek model with /models.
Last verified 5 steps3 official sources
Steps
- Step 1.
Install or upgrade OpenCode from https://opencode.ai/download. DeepSeek strongly recommends version v1.18.30 or newer.
- Step 2.
Start OpenCode.
Terminalopencode - Step 3.
Run /connect, type deepseek and select the DeepSeek provider.
Snippet/connect - Step 4.
Enter your DeepSeek API key from https://platform.deepseek.com/api_keys.
- Step 5.
Run /models and select a DeepSeek model.
Snippet/models
Caveats
- The two guides label the models differently. DeepSeek's page says to select "DeepSeek-V4-Flash" and OpenCode's page uses "DeepSeek V4 Pro" as its example. DeepSeek's current API ids are deepseek-flash (DeepSeek-V4.1-Flash-1017) and deepseek-v4-pro. The legacy deepseek-v4-flash id still works but is routed to V4.1 Flash.
- OpenCode's docs do not show the provider's base URL. The value listed here is DeepSeek's documented OpenAI-format base URL.
More setup guides
Same tool, other providers
Related reading
- 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.
- DeepSeek V4 Flash 0731: The Official Release, Benchmarks, and How to Run It in OpenCodeDeepSeek V4 Flash 0731 is the official V4 Flash API release, re-post-trained to beat V4-Pro-Preview on agent benchmarks. How to run it in OpenCode today.
- 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.
- 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.
FAQ
How do I use DeepSeek in OpenCode?
OpenCode has a built-in DeepSeek provider, and both DeepSeek's integration guide and OpenCode's provider docs describe the same setup: /connect, choose DeepSeek, paste your API key, then pick a DeepSeek model with /models.
Which DeepSeek model ids work in OpenCode?
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 OpenCode setup?
The steps draw on both DeepSeek's and OpenCode's docs. It was last checked against 3 official pages on October 17, 2026.
Sources
Last verified against 3 official pages.
- api-docs.deepseek.comhttps://api-docs.deepseek.com/quick_start/agent_integrations/opencode
- opencode.aihttps://opencode.ai/docs/providers/
- api-docs.deepseek.comhttps://api-docs.deepseek.com/quick_start/pricing
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.