DeepClaude swaps Claude Code's Anthropic backend for DeepSeek V4 Pro at 17x lower cost

✍️ OpenClawRadar📅 Published: May 4, 2026🔗 Source
DeepClaude swaps Claude Code's Anthropic backend for DeepSeek V4 Pro at 17x lower cost
Ad

Claude Code's autonomous agent loop (file editing, bash, git, subagent spawning) is the best in class. The problem: it costs $200/month with caps. DeepClaude is a thin shell script that swaps the backend model while keeping the entire tool loop unchanged. Default backend is DeepSeek V4 Pro ($0.44/M input, $0.87/M output) vs Anthropic's $3/$15 per million tokens — a 17x price difference.

How it works

Claude Code reads environment variables for API endpoint and auth. DeepClaude sets these per-session:

  • ANTHROPIC_BASE_URL — API endpoint
  • ANTHROPIC_AUTH_TOKEN — API key for the backend
  • ANTHROPIC_DEFAULT_OPUS_MODEL — model name for Opus-tier tasks
  • ANTHROPIC_DEFAULT_SONNET_MODEL — model name for Sonnet-tier tasks
  • ANTHROPIC_DEFAULT_HAIKU_MODEL — model name for Haiku-tier (subagents)
  • CLAUDE_CODE_SUBAGENT_MODEL — model for spawned subagents

After launch, original settings are restored on exit.

Quick start (2 minutes)

1. Get a DeepSeek API key — sign up at platform.deepseek.com, add $5 credit.

2. Set environment variable:

# Windows (PowerShell)
setx DEEPSEEK_API_KEY "sk-your-key-here"

macOS/Linux

echo 'export DEEPSEEK_API_KEY="sk-your-key-here"' >> ~/.bashrc source ~/.bashrc

3. Install the script:

# Windows — copy to a directory in PATH
Copy-Item deepclaude.ps1 "$env:USERPROFILE\.local\bin\deepclaude.ps1"

macOS/Linux

chmod +x deepclaude.sh sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaude

4. Use it:

deepclaude                              # Launch with DeepSeek V4 Pro (default)
deepclaude --status                     # Show available backends and keys
deepclaude --backend or                 # Use OpenRouter ($0.44/M input)
deepclaude --backend fw                 # Use Fireworks AI (fastest, US servers)
deepclaude --backend anthropic          # Normal Claude Code (for Opus)
deepclaude --cost                       # Show pricing comparison
deepclaude --benchmark                  # Latency test across all providers
Ad

Supported backends

BackendFlagInput/MOutput/MServersNotes
DeepSeek (default)--backend ds$0.44$0.87ChinaAuto context caching (120x cheaper on repeat turns)
OpenRouter--backend or$0.44$0.87USCheapest latency from US/EU
Fireworks AI--backend fw$1.74$3.48USFastest inference
Anthropic--backend anthropic$3.00$15.00USOriginal Claude Opus

Cost comparison

  • Light usage (10 days/month): Anthropic Max $200/mo → DeepSeek ~$20/mo → 90% savings
  • Heavy usage (25 days/month): $200/mo → ~$50/mo → 75% savings
  • With auto loops: $200/mo → ~$80/mo → 60% savings

DeepSeek's automatic context caching makes agent loops extremely cheap — after the first request, the system prompt and file context are cached at $0.004/M vs $0.44/M uncached.

What works and what doesn't

Works: File reading/writing/editing, bash/PowerShell execution, glob/grep search, multi-step autonomous tool loops, subagent spawning, git operations, project initialization (/init), thinking mode (enabled by default).

Doesn't work or degraded: Image/vision input (DeepSeek's Anthropic endpoint doesn't support images), parallel tool use (disabled — tools execute one at a time), MCP server tools (not supported through compatibility layer). Prompt caching savings are handled by DeepSeek's own system.

Who it's for

Developers running Claude Code heavily on agent loops who want near-identical functionality at a fraction of the cost — especially for iterative coding tasks where DeepSeek V4 Pro's 96.4% LiveCodeBench score is more than sufficient.

📖 Read the full source: HN AI Agents

Ad

👀 See Also

Apideck CLI: A Low-Context Alternative to MCP for AI Agents
Tools

Apideck CLI: A Low-Context Alternative to MCP for AI Agents

Apideck CLI is an AI-agent interface that uses ~80 tokens for its agent prompt instead of tens of thousands for tool schemas, addressing MCP's context window consumption problem. Benchmarks show MCP can cost 4 to 32× more tokens than CLI for identical operations.

OpenClawRadar
Claude Code v2.1.126: Model Picker, Project Purge, OAuth Fixes, and Security Improvements
Tools

Claude Code v2.1.126: Model Picker, Project Purge, OAuth Fixes, and Security Improvements

Claude Code v2.1.126 adds a /model picker for Anthropic-compatible gateways, a new claude project purge command, fixes OAuth login in WSL2/SSH/containers, and patches security issues with managed settings and clipboard exposure on Windows.

OpenClawRadar
RalphTerm: ralph-style loop for Claude Code with cross-review sessions from different agents
Tools

RalphTerm: ralph-style loop for Claude Code with cross-review sessions from different agents

RalphTerm is an open-source Rust CLI that runs a ralph-style outer loop around Claude Code: it takes a markdown plan, executes tasks in fresh interactive sessions, and runs cross-review with a different model (e.g., Codex) in separate fresh sessions, feeding issues back into new implementer sessions.

OpenClawRadar
Orchino: Local Multi-Agent Orchestration System for Windows with Parallel Browser and UI Automation
Tools

Orchino: Local Multi-Agent Orchestration System for Windows with Parallel Browser and UI Automation

Orchino is a local multi-agent orchestration system for Windows that runs parallel browser and Windows tasks without hijacking the UI. A demo shows 4 agents completing 'Search Sony earbuds on Flipkart and Amazon, email the results, save to Notepad' in 29.5 seconds using true parallel execution.

OpenClawRadar