Skip to content

DeepSeek Agent Integrations

📖 3 min read deepseekagentclaude-codecopilotintegration
How to use DeepSeek as the backend model for Claude Code, GitHub Copilot, OpenCode, Kilo Code, and 15+ other AI coding agents — drop-in replacement with environment variables.
Key Takeaways
  • DeepSeek can replace Claude, GPT, or Gemini as the backend in 15+ coding agents by changing environment variables
  • Claude Code: set ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN to DeepSeek endpoints
  • GitHub Copilot: configure token endpoint and API key
  • All integrations use the same DeepSeek API key — no per-agent pricing

DeepSeek’s dual API compatibility means you can use it as the backend model for most popular AI coding agents — no code changes to the agent itself, just environment variables pointing to DeepSeek.

Claude Code

Replace Claude Code’s default Anthropic backend with DeepSeek:

Terminal window
# Linux/Mac
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=sk-your-deepseek-api-key
export ANTHROPIC_MODEL=deepseek-v4-pro
export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-v4-pro
export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-v4-pro
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-v4-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-v4-flash
export CLAUDE_CODE_EFFORT_LEVEL=max
# Start using Claude Code with DeepSeek
cd your-project
claude
Terminal window
# Windows PowerShell
$env:ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
$env:ANTHROPIC_AUTH_TOKEN="sk-your-deepseek-api-key"
$env:ANTHROPIC_MODEL="deepseek-v4-pro"
$env:CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"

GitHub Copilot

Configure Copilot to use DeepSeek as the LLM backend:

{
"github.copilot.advanced": {
"authProvider": "github-enterprise",
"debug.overrideEngine": "deepseek-v4-pro",
"debug.overrideProxyUrl": "https://api.deepseek.com"
}
}

OpenCode

OpenCode is a terminal-based AI coding assistant that supports DeepSeek natively. DeepSeek V4 Flash is available FREE and UNLIMITED on OpenCode — no API key required for basic usage, no usage limits, no credit card needed.

Terminal window
# Use DeepSeek V4 Flash — free, unlimited
opencode --model deepseek-v4-flash
# Or set environment for any model
export OPENAI_API_KEY=sk-your-deepseek-api-key
export OPENAI_BASE_URL=https://api.deepseek.com
export OPENAI_MODEL=deepseek-v4-pro

OpenCode automatically selects the best DeepSeek model for your task. See opencode.ai for documentation.

Kilo Code

Terminal window
export KILOCODE_PROVIDER=deepseek
export KILOCODE_API_KEY=sk-your-deepseek-api-key

Supported Agents — Full List

AgentFormatType
Claude CodeAnthropicTerminal CLI
GitHub CopilotOpenAI/AnthropicIDE extension
GitHub Copilot CLIOpenAITerminal CLI
OpenCodeOpenAITerminal CLI
Kilo CodeNativeIDE
CursorOpenAIIDE
AiderOpenAITerminal CLI
WorkBuddy / CodeBuddyOpenAIIDE
Oh My PiOpenAITerminal
OpenClawOpenAIAgent framework
AstrBotOpenAIChat
Deep CodeNativeIDE
HermesOpenAIAgent
nanobotOpenAIAgent
CrushOpenAITerminal
PiOpenAITerminal
ReasonixOpenAIAgent
LangcliOpenAITerminal

Cost Advantage

Using DeepSeek as the backend for your coding agents dramatically reduces costs:

Agent BackendCost for 10K coding interactions (avg 3K in / 1K out)
Claude Opus 4.7$225
Claude Sonnet 4.6$135
GPT-5.4$112.50
DeepSeek V4 Pro$19.50
DeepSeek V4 Flash$6.30

Setup Pattern

All integrations follow the same pattern:

  1. Get a DeepSeek API key from platform.deepseek.com
  2. Set environment variables pointing to DeepSeek’s API endpoints
  3. Start using your favorite agent — it now runs on DeepSeek

No agent code changes needed. For agents not listed, check if they support custom OpenAI-compatible endpoints — DeepSeek works anywhere OpenAI works.

Where Next