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 Super-Agent: The Always-On Router and Worker DesignDeepSeek open-sourced dsh-superagent, an always-on coding agent built on a router and worker split. What the design says, what the code ships, and the safety debate.
- DeepInfer: What DeepSeek Open-Sourced and What You Can RunDeepSeek open-sourced DeepInfer, the inference engine behind its API. It is offline-only, V4.1-Flash-only and Blackwell-or-Ascend-only. What it is, what is missing, and who benefits.
- DeepSeek Banned From US Federal Civilian Agencies: What the DHS Order CoversDHS ordered DeepSeek products removed from US civilian agency IT. The scope reaches third-party products built on DeepSeek implementations - here is what that means for builders.
- 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.
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.