Use DeepSeek with OpenCode

OpenCode has first-class custom-provider support — set the base URL and model in one config block.

0 次 AgentRunDB 真实运行支撑

目标: Use DeepSeek inside OpenCode.

agent
opencode
model
deepseek
测试版本
OpenCode 0.x · deepseek-chat

可用配置

# opencode.json
{
  "provider": {
    "deepseek": {
      "npm": "@ai-sdk/openai-compatible",
      "options": { "baseURL": "https://api.deepseek.com/v1" },
      "models": { "deepseek-chat": {} }
    }
  }
}

Steps

  1. Add the provider block to opencode.json
  2. Run opencode, pick deepseek-chat as the model
  3. Set DEEPSEEK_API_KEY in your environment

Status: source-level recipe — verification runs queued.

相关: opencode × deepseek 兼容性