Updated 2026-06-02

DeepSeek in Claude Desktop via Model Mapping

DeepSeek officially documents an Anthropic-compatible endpoint for Claude Code. That remains the strongest baseline: set the endpoint, token, and exact model strings, then verify the request against DeepSeek before relying on it. The newer Claude Desktop story is no longer just community lore, though. After Claude Code Desktop 1.6259.1 introduced stricter Gateway model-ID checks, direct third-party model names can fail, and DeepSeek's Anthropic API guide now explicitly documents Claude-style model mapping to DeepSeek Pro or Flash. Community tools still matter for stricter Desktop workflows, but the mapping behavior itself is now partly grounded in vendor docs.

1. Start with the official Claude Code endpoint

DeepSeek's primary vendor-documented route is Claude Code configuration through Anthropic-compatible environment variables. Use this path first because the endpoint URL, auth token, and model strings are grounded in DeepSeek's own documentation.

The important values are `ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic`, your DeepSeek API token, and exact model names such as `deepseek-v4-pro[1m]` and `deepseek-v4-flash`. Model spelling matters because unsupported names may fall back to Flash.

DeepSeek's main API quick-start now adds a migration deadline that many older Claude tutorials still miss: `deepseek-chat` and `deepseek-reasoner` are marked for deprecation on `2026-07-24`. They only exist as compatibility aliases, and both route to Flash-family behavior rather than acting as durable Claude Code pins.

export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="deepseek-v4-pro[1m]"
export ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro[1m]"
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-pro[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
export CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"
export CLAUDE_CODE_EFFORT_LEVEL="max"

Sources checked

2. Understand the Claude Desktop whitelist change

The user-provided WeChat report describes a newer Claude Code Desktop behavior: after version 1.6259.1, Gateway performs stricter model-ID checks and can reject direct third-party model names before a normal conversation starts.

That explains why older Desktop tutorials can suddenly fail even when the DeepSeek base URL and API key are correct. The failure is no longer only about credentials; it can be about the model ID visible to Claude Desktop.

Treat this as a Desktop-app workflow issue, not as proof that the DeepSeek Anthropic-compatible endpoint stopped working. Claude Code environment variables remain the vendor-documented route.

Sources checked

3. Use model mapping when direct Desktop IDs fail

The more accurate name for the new route is Claude Desktop model mapping. Desktop sees an Anthropic-looking alias, while DeepSeek's Anthropic-compatible endpoint or a community tool maps that alias to a DeepSeek model ID before the provider call.

DeepSeek's own Anthropic API guide now makes the official mapping rule explicit: `claude-opus*` maps to `deepseek-v4-pro`, while `claude-haiku*` and `claude-sonnet*` map to `deepseek-v4-flash`. The same page says this can bypass model-name restrictions in the new Claude Desktop app's developer mode when you change only the base URL and API key.

The article-specific tool still matters as an optional layer. CC Desktop Switch can help where you need tighter Desktop-side control or GUI-driven alias management. But use any Desktop mapping route only where you can verify the installed version, the mapper configuration, and the actual provider-side model usage. If a future Desktop release adds stricter checks, this path can break again.

Desktop mapping model
Desktop sideMapping layerDeepSeek side
Claude-style model aliasMaps alias to a provider modeldeepseek-v4-pro[1m] or deepseek-v4-flash
Gateway API keyStored in the mapper/provider profileDeepSeek API key
Thinking and context optionsEnabled through the mapper UI if supportedVerify Pro, 1M context, and thinking in usage logs
Desktop UI labelNot sufficient proof by itselfProvider dashboard is the source of truth

Sources checked

4. Verify the connection actually worked

Do not assume it worked just because the app launched. A GUI, settings file, or mapped alias can be accepted while the runtime still falls back or maps an unsupported model string.

First test the endpoint directly with curl so you know the API key, base URL, and Anthropic-compatible request shape are valid. Then test from Claude Code or Desktop.

The article describes an important trap: adding a `claude-` prefix can help Desktop pass model-ID checks, but it can also leave DeepSeek seeing an unsupported model name and serving Flash instead of Pro. That is why the provider dashboard matters.

Warning from DeepSeek's own docs: if you ever manually specify a model name the endpoint doesn't recognize, it silently maps to deepseek-v4-flash. This means you could be on Flash thinking you're on Pro. Match the official model strings exactly in the mapper's provider-side target.

That warning now overlaps with a real cleanup deadline: do not keep `deepseek-chat` or `deepseek-reasoner` in old settings files past July 24, 2026 just because they still appear to work today. The quick-start marks both names as compatibility aliases scheduled for deprecation.

Sources checked

5. settings.json fallback for Desktop-style workflows

If your version of Claude Desktop does not expose a Gateway GUI, or if you prefer a file-based approach, you can document a settings.json fallback. Keep this separate from the official Claude Code environment-variable route because Desktop configuration paths can change by release.

Claude Desktop looks for settings at `~/.claude/settings.json`. On macOS that's `/Users/<you>/.claude/settings.json`, on Windows it's `C:\Users\<you>\.claude\settings.json`. If the file doesn't exist, create it.

Save the file, fully quit Claude Desktop (Cmd+Q on macOS, not just closing the window), and reopen. The app reads settings.json only at startup.

The `ANTHROPIC_DEFAULT_*` variables prevent internal model aliases from falling back to Anthropic defaults. The model string uses `deepseek-v4-pro[1m]` with the bracket suffix — this is the exact value from DeepSeek's dedicated Claude Code integration page. Using `deepseek-v4-pro` without the `[1m]` suffix can trigger silent fallback to Flash.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.deepseek.com/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "sk-...",
    "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",
    "CLAUDE_CODE_EFFORT_LEVEL": "max"
  }
}

Sources checked

6. Troubleshooting common issues

Developer menu not showing: you're probably already logged in. Log out, return to the login screen, and check Help → Troubleshooting again. Be careful with Desktop updates if a third-party Gateway workflow is important to you.

Direct DeepSeek model IDs fail in Gateway: your Desktop build may be applying a model-ID whitelist. Try the official Claude Code environment-variable route first; if you need Desktop, use a mapping layer and verify it locally.

Adding `claude-` lets the UI respond but Pro usage never appears: the Desktop-side name may pass the whitelist while DeepSeek still receives an unsupported provider-side model name and falls back to Flash.

Gateway configuration saved but app still uses Anthropic models: you may have chosen 'Sign in' instead of 'Local' at the launch screen after restart. Quit and reopen, then choose Local mode.

App won't start after editing settings.json: your JSON is probably malformed. Check for trailing commas, missing quotes, or extra characters. Paste the content into any JSON validator.

Getting authentication errors: verify your DeepSeek API key is active and has available credits. You can test it independently with curl before troubleshooting the desktop app.

If you need a stable Desktop workflow, keep a known-good installer and re-test after every Claude Code Desktop update. The mapping route is community tooling, not a vendor-stable contract.

# Quick API key test (run in terminal, not in Claude Desktop)
curl -s https://api.deepseek.com/anthropic/v1/messages \
  -H "x-api-key: sk-..." \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "Say hello in one word."}]
  }' | head -c 500

7. Know what does and doesn't carry over

DeepSeek's Anthropic-compatible API is intentionally focused on the most-used features. Text chat, code generation, and basic tool use work reliably. But it is not a perfect clone of every Anthropic capability.

The current DeepSeek compatibility page explicitly marks these as unsupported or ignored: image blocks, document blocks, search_result blocks, and several MCP-specific message and tool fields. If your workflow depends heavily on image analysis, document processing through Claude Desktop's native handlers, or advanced MCP features, test those paths specifically before committing.

One more detail from Anthropic's own docs: when the base URL points to a non-Anthropic host, MCP tool search may be disabled by default. If you need that feature, verify it works in your specific setup.

The practical takeaway: use this setup for everyday coding, writing, research, data analysis, and tool-assisted workflows. For the deepest Claude-specific features, keep a fallback plan.

Sources checked

FAQ

What is the accurate name for the new Claude Desktop method?

Claude Desktop model mapping. The Desktop app sees Claude-style aliases, and a community mapping layer translates those aliases to DeepSeek V4 Pro or Flash.

Is CC Desktop Switch official?

No. It is still community tooling. But the underlying Claude-style model mapping concept is no longer purely community-only, because DeepSeek's Anthropic API guide now documents official mapping from claude-opus / sonnet / haiku style names to DeepSeek Pro or Flash.

Does adding `claude-` to the DeepSeek model name work?

It may pass Claude Desktop's model-ID check, but it is not a reliable Pro route. DeepSeek may treat the altered name as unsupported and fall back to Flash.

Why did my session end up on Flash instead of Pro?

Check provider-side model strings and the DeepSeek usage dashboard. DeepSeek's API silently maps unrecognized model names to deepseek-v4-flash, so `deepseek-v4-pro[1m]`, `deepseek-v4-pro`, a prefixed alias, and the legacy `deepseek-chat` / `deepseek-reasoner` compatibility names are not interchangeable.

Can I use this with the Claude web app (claude.ai)?

No. Gateway, Local mode, and model mapping are Desktop-app workflows. The claude.ai website does not expose this configuration path.

Should I still use `deepseek-chat` or `deepseek-reasoner` in Claude Code configs?

No for new setups. DeepSeek's official API quick-start marks both names for deprecation on July 24, 2026 and treats them as compatibility aliases that map to Flash-family behavior. Use the exact V4 model strings from the official Claude Code guide instead.

Will file uploads and image analysis still work?

Text and code files work normally. Image analysis may not carry over because DeepSeek's compatibility page marks image blocks as unsupported. Test image uploads explicitly before relying on them.

How do I switch back to Anthropic's default models?

Quit Claude Desktop, reopen, and sign into your Anthropic account at the launch screen instead of choosing Local mode. The Gateway configuration stays saved on disk — it's only active when you select Local mode.

Where do I get a DeepSeek API key?

You can register on DeepSeek's official platform, or get a discounted official key from /pricing — same API, same endpoint, lower price.

Use the official DeepSeek Claude Code endpoint setup as the reliable baseline. For Claude Code Desktop builds that block direct third-party model IDs, the newer answer is layered: DeepSeek now officially documents Claude-style model mapping in its Anthropic API guide, while community Desktop tools can still help manage stricter Gateway behavior. In all cases, trust provider-side verification over UI labels before assuming Pro, Flash, 1M context, or thinking mode really worked.

Related model comparisons

Continue from this guide into structured DeepSeek-first comparison pages with model tables, routing advice, and pricing context.