How to Connect Claude Desktop to DeepSeek V4 for 1M‑Token Context
This guide walks through installing Claude Desktop, enabling Developer Mode, obtaining a DeepSeek API key, configuring the Anthropic‑compatible gateway, adding DeepSeek V4‑Pro and V4‑Flash models (including the 1M‑token variant), verifying the setup, and troubleshooting common issues.
Identify DeepSeek V4 models
DeepSeek released a V4 preview on 2026‑04‑24 with two MoE models: deepseek-v4-pro – 1.6 T parameters, 49 B activation, suited for code writing, agents, long documents. deepseek-v4-flash – 284 B parameters, 13 B activation, suited for everyday conversation, batch tasks.
Both support a 1 M‑token context and expose an Anthropic‑compatible endpoint at https://api.deepseek.com/anthropic.
Install Claude Desktop
macOS
Download from https://claude.com/download, select “Universal Claude PKG”, run the installer until “Installation successful”.
Windows
From the same page scroll to “Enterprise deployment”, choose the appropriate MSIX (x64 or arm64), download and double‑click to install. Configuration thereafter matches macOS.
Enable Developer Mode
In Claude Desktop open Help → Troubleshooting → Enable Developer Mode. The app restarts and a “Developer” menu appears. If missing, upgrade Claude.
Obtain DeepSeek API key
Visit https://platform.deepseek.com/, go to “API keys”, create a new key and copy it (shown only once).
Configure third‑party inference
Open Developer → Configure Third‑Party Inference. Two tabs must be filled: “Connection” and “IDENTITY & MODELS”.
Connection settings
Gateway base URL: https://api.deepseek.com/anthropic (no trailing slash).
Gateway API key: the key from the previous step.
Gateway auth scheme: bearer (default for non‑*.anthropic.com domains).
Leave “Gateway extra headers” empty.
Identity & Models
Click “+ Add” in the Model list and add two entries:
Model ID deepseek-v4-pro, enable “Offer 1M‑context variant”.
Model ID deepseek-v4-flash, enable “Offer 1M‑context variant”.
Exact spelling is required; otherwise a 404 error occurs. After adding, click “Apply locally”, confirm the relaunch prompt, and restart Claude.
Verification
Start a new conversation, open the model selector (lower‑right). Four options should appear: DeepSeek 4 Pro, Pro 1M, Flash, Flash 1M. Sending “What model are you?” lets each model identify itself, confirming the integration.
Troubleshooting checklist
Developer menu missing → Developer Mode not enabled; enable via Help → Troubleshooting.
Only Anthropic models appear → Model list not saved or Apply not clicked; add models again and click Apply.
All requests return 401 → Wrong auth scheme or invalid key; switch to bearer and regenerate key.
All requests return 404 → Base URL ends with a slash; remove trailing slash.
1M‑token variant not active → Variant switch off; enable the 1M variant in the Model list.
Switch back to Anthropic → Change Connection base URL back to Anthropic endpoint; existing config remains.
Choosing between Pro and Flash
Flash is default for everyday questions, SQL generation, copy editing, and single‑function annotation – faster and cheaper.
Pro is preferred for codebases larger than 200 lines, multi‑step agents, or long‑document analysis where higher quality is noticeable.
The 1M‑token variant is rarely needed; enable only for tasks that require feeding an entire repository README or core modules, as it increases context‑based pricing.
Alternative: Claude Code CLI
The CLI can use a third‑party gateway by setting the ANTHROPIC_BASE_URL environment variable, which is simpler for terminal‑only workflows. Claude Desktop adds a GUI with project file browsing, one‑click model switching, and integrated MCP, Projects, and Artifacts tools while retaining DeepSeek pricing.
Alternative: DeepSeek web UI
DeepSeek’s web UI can chat, write code, and analyze documents, but it lacks integration with local databases, Git repositories, and Claude’s agent execution framework. Attaching DeepSeek to Claude Desktop provides DeepSeek’s cost structure together with the full Claude Desktop toolchain.
Relevant links
Claude Desktop download: https://claude.com/download DeepSeek developer platform: https://platform.deepseek.com/ Anthropic‑compatible API docs: https://api-docs.deepseek.com/guides/anthropic_api V4 release notes:
https://api-docs.deepseek.com/zh-cn/news/news260424Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Tech Ocean
Focused on AI programming, sharing ready-to-use development efficiency solutions.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
