Providers

How to Use DeepSeek with Claude Code Through a Proxy

By Kavin M KPublished Updated 7 min read

Quick answer
Add DeepSeek as an OpenAI-compatible custom provider in Prism, add its models to your catalog, then map Claude Code's opus, sonnet, haiku and subagent tiers onto them. Claude Code keeps using its own model names; Prism rewrites them.

DeepSeek has become a favorite among developers for its combination of strong reasoning ability and remarkably low pricing. The flagship deepseek-chat model handles complex coding tasks at a fraction of the cost of comparable models, and the deepseek-reasoner model adds explicit chain-of-thought reasoning for harder problems.

The catch is that Claude Code only talks to the Anthropic Messages API, while DeepSeek exposes an OpenAI-compatible Chat Completions endpoint. Prism translates between the two formats so you can use DeepSeek as the backend for Claude Code with no changes to the agent itself.

Why DeepSeek

DeepSeek's models punch well above their price point. For coding agents that make hundreds of requests per session, the cost difference versus premium providers adds up fast. DeepSeek also supports extended reasoning through the deepseek-reasoner model, which emits visible thinking tokens that Prism can pass through to the agent.

Step by step

1

Get a DeepSeek API key

Sign in at platform.deepseek.com and create an API key.
2

Add DeepSeek as a custom provider in Prism

Open the Prism admin UI at http://127.0.0.1:8765/admin, go to the Provider tab, and click Add custom provider. Set the base URL to https://api.deepseek.com/v1 and paste your API key.
3

Add models

In the Models tab, add the models you want to use. The two most common are deepseek-chat for general coding and deepseek-reasoner for complex reasoning tasks. Prism can auto-fill these from models.dev.
4

Set up Claude Code

Go to the Agents tab and click Setup next to Claude Code for one-click integration.

Manual environment variables

$env:ANTHROPIC_BASE_URL = "http://127.0.0.1:11434"
    $env:ANTHROPIC_AUTH_TOKEN = "prism"

Model remapping

Map Claude Code's default model names to DeepSeek models so that requests are routed correctly:

// %APPDATA%\prism\model_remapping.json
    {
      "default_model": "deepseek-chat",
      "known_models": [
        { "id": "deepseek-chat",     "provider": "custom_deepseek" },
        { "id": "deepseek-reasoner", "provider": "custom_deepseek", "reasoning": true }
      ],
      "aliases": {
        "claude-3-5-sonnet-20241022": "deepseek-chat",
        "claude-3-5-haiku-20241022":  "deepseek-chat",
        "claude-3-opus-20240229":     "deepseek-reasoner"
      }
    }

With this mapping, Claude Code's primary Sonnet requests go to deepseek-chat for fast, affordable completions, while Opus-tier requests are routed to deepseek-reasoner for harder reasoning tasks.

Reasoning and thinking support

The deepseek-reasonermodel returns a separate reasoning trace alongside the final answer. Prism preserves this trace and passes it through as part of the response. For agents that support reading reasoning tokens, this provides transparency into the model's thought process. For agents that do not, the reasoning content is simply included as context.

Tip
Use deepseek-reasoner for your Opus-tier mapping so that the most complex requests get explicit reasoning. Keep deepseek-chat for the Sonnet and Haiku tiers to keep latency low for everyday tasks.

Config example

// %APPDATA%\prism\config.json
    {
      "custom_providers": [
        {
          "id": "custom_deepseek_4d5e6f",
          "name": "DeepSeek",
          "base_url": "https://api.deepseek.com/v1",
          "api_key": "sk-your-deepseek-key"
        }
      ]
    }

Get started

Download Prism, add DeepSeek as a custom provider, remap your models, and start Claude Code. You will be running on DeepSeek's powerful, affordable models in minutes.

Download Prism

Reference

Every claim on this page is checked against the Prism source, and the reference documentation is where those details live in full.

Try it yourself

Prism is a free, MIT-licensed local proxy for AI coding agents. Install it, point one agent at http://127.0.0.1:11434, and the rest of this post applies as written.