Connect OpenCode to DeepSeek V3
Complete guide to configuring OpenCode TUI with DeepSeek V3 for fast terminal development.
● Backed by 2 AgentRunDB runs · Success rate 50%
Goal: Configure OpenCode terminal agent with DeepSeek V3 API.
- agent
- opencode
- model
- deepseek
- Tested versions
- OpenCode 1.18.x · deepseek-chat
- Last verified
- 2026-08-18
Working Configuration
{
"provider": {
"deepseek": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.deepseek.com/v1"
},
"models": {
"deepseek-chat": {}
}
}
}
}Quick Setup
- Put the configuration block above in your
~/.config/opencode/opencode.jsonor workspaceopencode.json. - Set your environment variable:
export DEEPSEEK_API_KEY=sk-... - Launch OpenCode:
opencodeand selectdeepseek/deepseek-chat.
Verification Status
Verified in AgentRunDB test harness for basic workspace read/write and unit test execution.
Related: opencode × deepseek Compatibility →