Using DeepSeek with Claude Code to lower coding assistant costs

This Reddit post explains how to connect the Claude Code extension in VS Code and the CLI to DeepSeek API instead of Anthropic. The author says DeepSeek provides an Anthropic Messages API compatible endpoint, so Claude Code tools can use DeepSeek models. The post includes setup steps, API key setup, model mapping, cost comparison, and troubleshooting.

Key points

  • The guide connects the Claude Code extension and CLI to DeepSeek API.
  • It says DeepSeek offers an Anthropic Messages API compatible endpoint.
  • The target reader is a developer looking for a cheaper GitHub Copilot alternative.
  • The post covers API key setup, VS Code setup, CLI setup, cost comparison, and troubleshooting.
  • The author says it was verified on Windows Server 2019 and Windows 10 or newer.

Quick term guide

compatible
Parts that can work together without causing a mismatch.
AI agent workflow
A series of automated steps where AI tools work in sequence to complete a task without manual input each time.
agent workflows
Step-by-step work patterns where an AI agent handles a task.
agent workflow
A set of steps an AI follows automatically to complete a series of tasks in order.
assistants
AI helpers that respond to questions or support simple tasks.
model provider
The external AI service (such as OpenAI or Anthropic) that Cursor connects to in order to generate code suggestions.
terms of use
A set of rules you agree to when using a service, defining what you are and aren't allowed to do with it.
GitHub Copilot
A popular tool that helps programmers write code using artificial intelligence.
Read original