0:00
/
Generate transcript
A transcript unlocks clips, previews, and editing.

How to Use DeepSeek as the Model Behind Claude Code

A recording from Wyndo's live video

For the last few months on One Shot Show, Dheeraj Sharma and I have spent a lot of time using frontier models through Claude Code, Claude Cowork, Codex, and ChatGPT.

Those models are still where I would go for difficult planning, unclear problems, heavy-coding task, visual work, and tasks that need the strongest thinking mode and huge computing power.

But open models are getting capable enough to take on more of the repetitive work. They are also much cheaper to use through the API. That creates a practical question: why keep using a frontier model for every extraction, transcript‑processing job, scheduled summary, or recurring research task when you can easily switch to open models?

For Episode 22, Dheeraj showed me how he was answering that question. He connected DeepSeek to Claude Code, ran an existing research agent through it, and kept the Claude Code interface, project files, commands, subagent, and local MCP tools in place.

He had already moved two agents that run on his computer at 4:00 AM. Those agents kept their existing commands and project setup while DeepSeek handled the model requests, not Claude.

In one of his comparison tasks, Claude Opus cost about 32 cents, Kimi cost about 24 cents, and DeepSeek cost roughly half a cent. But, those results come from his setup, so your costs will depend on the task, token usage, caching, and tools. And, this huge cost gap makes the case worth exploring.

That’s why, in this post, I walk you through the implementation we showed live: creating the DeepSeek key, configuring a single Claude Code project, verifying the connection, running the agent, and switching back when you need Claude again.

One thing you need to understand before we start: this setup accesses DeepSeek through its hosted API. Normally, running a model locally would require a tool such as Ollama or OpenRouter, or hardware powerful enough to support the model you choose.

But this setup is easier to build, so you can start without much integration work upfront.

Why Move Some Claude Code Tasks to Open Models

As of August 9, 2026, DeepSeek lists V4 Flash at $0.14 per million uncached input tokens and $0.28 per million output tokens. V4 Pro is listed at $0.435 per million uncached input tokens and $0.87 per million output tokens.

Claude Opus 5 is listed at $5 per million input tokens and $25 per million output tokens. Claude Sonnet 5 has introductory pricing of $2 per million input tokens and $10 per million output tokens through August 31, 2026, followed by $3 and $15.

As open models get better, it makes sense to stop using a pricier frontier model for every task, especially repeated work that no longer needs the strongest reasoning.

Dheeraj’s examples included processing YouTube transcripts, turning One Shot Show recordings into structured material, generating Substack Notes, and running research jobs with a fixed output. He had already figured out the process. DeepSeek only needed to repeat it at a much lower cost.

Here’s how to set it up:

🚨 Before we deep dive into how to set up DeepSeek using the Claude Code system, I’d recommend watching the full video in case you run into any issues, because Dheeraj shows the exact screens and configuration you need to implement to ensure DeepSeek runs successfully on your Claude Code system.

Step 1: Create a DeepSeek API Key

Open DeepSeek Platform, create an account, and generate a new API key from the API Keys page.

Before you can run, you need to buy the API token as low as $2.

Copy the key when it is created. You will use it to authenticate Claude Code with DeepSeek’s API.

But, this billing is separate from a Claude Pro or Max subscription. Once Claude Code points to DeepSeek, the model requests use your DeepSeek API balance.

Step 2: Configure DeepSeek for One Claude Code Project

Claude Code supports gateway configuration through environment variables such as ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. DeepSeek now documents its own Claude Code integration using the same route.

Dheeraj placed the override in .claude/settings.local.json. Claude Code’s settings documentation describes this as the personal project-level settings file, while its environment variable guide says it applies only to you inside that project.

To keep it simple, inside the project folder you want to run with DeepSeek, create this file:

.claude/settings.local.json

Then add the following configuration:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.deepseek.com/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_DEEPSEEK_API_KEY>",
    "ANTHROPIC_MODEL": "deepseek-v4-pro[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4-pro[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4-pro[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4-flash",
    "CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-v4-flash"
  }
}

Replace <YOUR_DEEPSEEK_API_KEY> with your key.

The model names and endpoint above match DeepSeek’s current integration guide as of August 9, 2026. Dheeraj used V4 Flash as the main model during the live demonstration, while the current official configuration recommends V4 Pro for the main model. Check the official guide before configuring a live project because these values can change.

Keep the file out of Git. Claude Code normally treats .claude/settings.local.json as a personal file, and the official docs say to add it to .gitignore when you create it by hand.

The configuration maps the main Claude model slots to DeepSeek V4 Pro and the smaller Haiku and subagent slots to DeepSeek V4 Flash. This allows the project and any spawned subagents to stay on DeepSeek.

Step 3: Restart Claude Code and Confirm DeepSeek Is Active

Exit the current Claude Code session after saving the settings file. Start Claude Code again inside the same project, then run:

/status

Before the change, Dheeraj’s status screen showed a Claude model and the standard Anthropic connection. After restarting, the base URL pointed to DeepSeek and the active model showed DeepSeek V4 Flash, which was the main model in his settings.

Check both values before running the agent. If /status still shows the original Claude configuration, confirm that the file is named exactly .claude/settings.local.json, the JSON is valid, and Claude Code was restarted after the change.

Step 4: Check the Project’s MCP Connections

Dheeraj’s Scout agent used Tavily through a project-level MCP server. Its configuration lived in .mcp.json, while the Tavily API key was stored outside that file.

Run the following command inside Claude Code:

/mcp

You should see the MCP servers configured for the project or your local user account. In Dheeraj’s first check, Tavily reported a missing environment variable. He exported the Tavily key into the terminal session, restarted Claude Code, and ran the check again.

The second check showed Tavily as connected.

Step 5: Run the Same Agent Through DeepSeek

For the live test, Dheeraj used a small project called Scout. It has a command that allows the agent to run when a new research topic comes in. It launches a researcher sub-agent, searches with Tavily, and writes a source brief into a briefs folder.

Here’s what he ran:

/scout AI agents pricing for 2026

Since DeepSeek was implemented, it has been handling model requests within the same project that the Claude model already has access to. As a result, DeepSeek can now access the same project that Claude can access.

This is the test that decides whether the integration is useful. Give the Claude version and the DeepSeek version the same input, then compare:

  • The final output

  • Time to completion

  • Model cost

  • Tool calls and tool cost

  • Corrections needed afterward

Dheeraj’s comparison slide showed about 32 cents for the Opus run, 24 cents for Kimi, and half a cent for DeepSeek. The exact numbers will change depending on the task load.

Step 6: Switch the Project Back to Claude

Because the model override lives inside one project, returning to Claude is simple. Rename or remove .claude/settings.local.json, restart Claude Code, and run /status again.

With no local model override, Claude Code falls back to your normal Claude configuration.

One of audiences asked whether there was a simple way to switch models depending on the project. Dheeraj suggested keeping several named templates, such as:

settings.local.json.deepseek
settings.local.json.kimi
settings.local.json.claude

Before starting Claude Code, rename the configuration you want to .claude/settings.local.json. A small script could handle the rename if you switch often.

You can also configure providers globally or route several models through OpenRouter. Dheeraj preferred the project-level method because it limits the change to one known job while you test it. I would start there too.

There’s also another way to do it by running your AI models inside Buzz, which we’ll explore in more depth in an upcoming session.

Share

Which Tasks Should You Outsource to an Open Model?

Now that you understand how to integrate DeepSeek, you can apply the same project-level approach to other open models, including Kimi and GLM. Each provider requires its own endpoint, API key, and model mapping, so you cannot reuse the DeepSeek settings without updating it.

Before going there, it helps to understand which types of work should be outsourced to an open model. Here is how I would think about it:

  1. Repetitive text processing: Transcript cleanup, extraction, tagging, classification, formatting, and summaries.

  2. Structured research with clear limits: Source briefs, recurring scans, and research tasks with fixed search and extraction budgets.

  3. Execution after the difficult thinking is finished: Following an approved plan, producing repeatable variations, or completing work that has already been designed by a stronger model.

  4. Low-risk work that is easy to verify: Tasks where mistakes are visible and the result can be checked before it goes anywhere important.

Keep difficult planning, ambiguous decisions, visual debugging, and high-stakes work on a frontier model. Those tasks still benefit from stronger reasoning and broader tool support.

Use Claude or another frontier model to figure out the process, then move the repeated execution after you trust it.

Dheeraj ended the session by saying two of his 4:00 AM agents were already running this way.

That is the version I would want too. Keep Claude Code as the system you work inside, use frontier models where their judgment earns the higher cost, and let cheaper open models handle the work they can now do well.

Show Details

Show: One Shot Show

Episode: 22

Topic: Using Claude Code with DeepSeek and other lower-cost models

Hosts: Wyndo and Dheeraj Sharma

Live schedule: Wednesdays at 10:00 AM ET on Substack

Timestamps

  • 00:01: Episode 22 introduction and why lower-cost models are becoming relevant

  • 00:04: Dheeraj’s two-week DeepSeek and Kimi experiment

  • 00:05: The “32 cents to half a cent” result and which jobs may be worth moving

  • 00:08: Is DeepSeek free, and what Dheeraj found when opening a new account

  • 00:10: Comparing model prices and discussing third-party Claude Code routing

  • 00:13: The project-level configuration begins

  • 00:16: Wyndo asks how the project returns to Claude

  • 00:17: Creating a DeepSeek API key and adding credit

  • 00:19: Inside the Scout research agent demonstration

  • 00:21: Why the Tavily search and extract limits must be explicit

  • 00:23: Creating .claude/settings.local.json

  • 00:24: Checking the original Claude model with /status

  • 00:28: Restarting Claude Code and confirming DeepSeek V4 Flash

  • 00:30: Loading the Tavily credential and checking MCP health

  • 00:31: Which MCP servers remain available after changing the base URL

  • 00:35: Comparing a Claude project with the DeepSeek-routed project

  • 00:36: Running Scout and launching the researcher subagent

  • 00:37: Choosing between migration, hybrid use, and keeping a project on Claude

  • 00:40: Why project-level model assignments are easier to manage

  • 00:42: Des Kennedy asks how to switch models by project

  • 00:47: Wyndo explains the OpenRouter route for multiple models

  • 00:49: DeepSeek image limitations and model-specific compatibility failures

  • 00:51: Comparing time, cost, capabilities, and cited sources

  • 00:52: The missing tool declaration that Claude improvised around

  • 00:54: Sixty Tavily calls and the hidden tool-cost problem

  • 00:55: How a credential became visible to the model provider

  • 00:56: Dheeraj’s model selection rules by type of job

  • 00:58: Wyndo previews a future Buzz session

  • 01:00: Project-level routing as Dheeraj’s recommended method

  • 01:02: Two recurring 4:00 AM agents already moved to DeepSeek

Resources Mentioned

  • Claude Code: The terminal-based agent interface used for the demonstration. Wyndo and Dheeraj discussed keeping its commands, subagents, project files, and MCP connections while changing the model provider.

  • DeepSeek Platform and API: The provider used for the live rerouting test. Dheeraj created an API key at platform.deepseek.com and reported adding a $2 balance for his test account. Current model billing is usage-based.

  • DeepSeek V4 Flash: The lower-cost model used for the Scout demonstration and subagent. DeepSeek’s August 9, 2026 list price is $0.14 per million uncached input tokens and $0.28 per million output tokens.

  • DeepSeek V4 Pro: The model mapped to demanding Claude model slots in the demonstrated configuration. DeepSeek’s August 9, 2026 list price is $0.435 per million uncached input tokens and $0.87 per million output tokens.

  • Claude Opus 5: Dheeraj’s higher-cost comparison model. His sample run cost about 32 cents. The current API list price discussed in the post is $5 per million input tokens and $25 per million output tokens.

  • Claude Sonnet 5: Discussed as another price comparison. Anthropic’s introductory rate is $2 per million input tokens and $10 per million output tokens through August 31, 2026, followed by $3 and $15.

  • Claude Haiku: Mentioned in the model mapping and as a smaller Claude model.

  • Kimi K3: Dheeraj tested it as another model behind agent tasks. His comparison slide showed an average run cost of about 24 cents for that test. Current general pricing was not established in the session.

  • Qwen: Mentioned by Dheeraj as another open model that could use a similar integration pattern.

  • Ollama: Mentioned as a way to run a supported model locally when the computer has enough resources.

  • OpenRouter: Wyndo suggested it as a gateway for mapping Claude Code model slots to several providers.

  • Buzz: Wyndo described it as a chat interface for connecting several agents and models in one conversation. A future One Shot Show session was being considered.

  • Tavily: The search and extraction service used by the Scout research agent through MCP. Dheeraj discussed a monthly credit quota but did not state the plan price.

  • MCP: The connection method used to give the project access to Tavily and other services.

  • .mcp.json: The project file that held the Tavily MCP configuration.

  • .claude/settings.local.json: The personal project-level file used to point Claude Code at DeepSeek.

  • .env: The local environment file used to hold the Tavily credential during the demonstration.

  • Scout command and researcher subagent: The demonstration agent that researched a topic and wrote a source brief into a briefs folder.

  • /status: The Claude Code command used to confirm the base URL and active model.

  • /mcp: The Claude Code command used to inspect available MCP servers.

  • /context and /usage: Commands Wyndo referenced for finding which sessions or agents consume usage.

  • Git and GitHub: Mentioned in the warning about accidentally committing API keys or local configuration files.

Discussion about this video

User's avatar

Ready for more?