Use DeepSeek with OpenCode
OpenCode has first-class custom-provider support — set the base URL and model in one config block.
● Backed by 0 AgentRunDB runs
Goal: Use DeepSeek inside OpenCode.
- agent
- opencode
- model
- deepseek
- Tested versions
- OpenCode 0.x · deepseek-chat
Working Configuration
# opencode.json
{
"provider": {
"deepseek": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "https://api.deepseek.com/v1" },
"models": { "deepseek-chat": {} }
}
}
}Steps
- Add the provider block to
opencode.json - Run
opencode, pick deepseek-chat as the model - Set
DEEPSEEK_API_KEYin your environment
Status: source-level recipe — verification runs queued.
Related: opencode × deepseek Compatibility →