Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • AI Browser Resources
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Comparisons
  • AI Browser Alternatives
  • Browser Productivity Resources

Popular Guides

  • AI Browser
  • Agentic Browser Download
  • Best AI Browser 2026: Top 9 Tested & Ranked
  • AI Browser Download
  • Free AI Browser
  • Best AI Browser 2026
  • AI Browser Comparison 2026
  • AI Browser for Windows
  • AI Browser for Mac
  • Chrome Alternative 2026

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
Prompt guide
OfficialDeepSeek V4 Pro

DeepSeek-V4-Pro 1M Context Environment Variable Configuration Workflow in Claude Code

Original source

DeepSeek API Docs (Agent Integrations / Claude Code)

AuthorDeepSeek

Source date2026-08-13

Tabbit curation2026-09-08

Read original

One-sentence takeaway

With 8 environment variables, you can point Claude Code (and Claude Desktop Developer Mode) to DeepSeek, unlock a 1M context window with deepseek-v4-pro[1m], use deepseek-v4-flash for subagents, set the main model's effort to max, and set the automatic compaction window to 786432.

Use cases

  • Suitable tasks: Coding-agent scenarios that need to connect V4-Pro to an existing Claude Code workflow at low cost and require a 1M long context window (for large codebases or long documents); switching the underlying model in Claude Desktop Developer Mode.

  • Unsuitable tasks: Scenarios with custom requirements for tool-call formats (Claude Code's harness rewrites the tool protocol, so model behavior differs from direct API access); tasks that require vision capabilities (the official V4 series is text-only).

  • Supported model versions: deepseek-v4-pro (the official integration also supports deepseek-v4-flash; the [1m] suffix unlocks a 1M context window).

  • Supported clients, agents, or APIs: Claude Code CLI and the Claude Desktop app (Developer Mode); the integration uses DeepSeek's Anthropic-compatible endpoint, https://api.deepseek.com/anthropic.

  • Recommended reasoning tier and parameters: The official example sets CLAUDE_CODE_EFFORT_LEVEL=max; subagents use deepseek-v4-flash without high effort. For direct API access, choose from the official low/high/max effort tiers.

Ready-to-use configuration

Configuration for migration or a fresh installation, as provided by the official documentation (store the API key in secure secret management; do not write it to Git or logs):

export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=<your DeepSeek API Key>
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
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432

Equivalent Windows PowerShell syntax (verbatim from the official documentation):

$env:ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
$env:ANTHROPIC_AUTH_TOKEN="<your DeepSeek API Key>"
$env:ANTHROPIC_MODEL="deepseek-v4-pro[1m]"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro[1m]"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-pro[1m]"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
$env:CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"
$env:CLAUDE_CODE_EFFORT_LEVEL="max"
$env:CLAUDE_CODE_AUTO_COMPACT_WINDOW="786432"

Then enter the project directory and run claude. For a fresh installation, first run npm install -g @anthropic-ai/claude-code (requires Node.js 18+).

Test/workflow steps

  1. If Claude Code is already installed, back up your environment variables and configuration first. For a fresh installation, install @anthropic-ai/claude-code and confirm that claude --version returns a version number.

  2. Set the environment variables above. Inject the API key through an environment variable rather than writing it in plaintext to your shell history (the official example uses <your DeepSeek API Key> as a placeholder).

  3. Enter the project directory and run claude. Start with read-only tasks (reading files, grep, and planning) and confirm that the banner shows the model as deepseek-v4-pro and that tool calls work correctly.

  4. Long-conversation test: with CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432 (about 768K tokens), observe whether context compaction behaves as expected. Use the 1M context only when needed; ordinary tasks do not need the [1m] suffix.

  5. When network retrieval is needed, DeepSeek API natively supports Claude Code's Web Search tool, which the model invokes automatically when it determines that search is necessary. Triggering retrieval incurs an additional LLM summarization-request charge, so include it in the cost budget.

  6. Record the model name, effort, compaction window, tool trace, and token cost after the test, and compare them with other backends on the same task set.

Source evidence and data

  • The official integration maps Claude model names to DeepSeek: claude-opus* → deepseek-v4-pro, and claude-haiku* / claude-sonnet* → deepseek-v4-flash. This mapping allows Claude Desktop Developer Mode to bypass model-name restrictions by changing the base URL and API key.

  • The official documentation states that Claude Code's Web Search is natively supported by the DeepSeek API and is invoked automatically when the model decides it is needed; the summarization request incurs additional token costs.

  • The [1m] suffix (deepseek-v4-pro[1m]) unlocks a 1M context window; the official pricing page confirms a 1M context window and a maximum output of 384K for V4-Pro.

Scope and limitations

  • This is a configuration workflow, not a model-quality benchmark. Claude Code's built-in tool protocol and system prompt change model behavior, and the client determines the long-context compaction strategy.

  • The official documentation provides only an environment-variable example. Secret handling, network egress, and cost limits are the user's responsibility; the official documentation does not provide guardrails.

  • Model-mapping rules may change with client versions. After upgrading Claude Code, recheck the mapping and whether [1m] is still accepted by the API.

  • CLAUDE_CODE_EFFORT_LEVEL=max is the value used in the official example. For simple tasks, it can be lowered to high/low to reduce latency and cost; use measurements on the target task to determine the appropriate setting.

Source excerpt or observation (for compliant short quotation only)

Official source text: “Models starting with claude-opus are mapped to deepseek-v4-pro; Models starting with claude-haiku or claude-sonnet are mapped to deepseek-v4-flash”.

Curated by Tabbit

Prompt material is summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

DeepSeek V4 Pro

Use in Tabbit

DeepSeek V4 Pro

Related prompts

OfficialDeepSeek API Docs

DeepSeek-V4-Pro Thinking Levels and Tool-Calling Workflow

OfficialDeepSeek API Docs

DeepSeek-V4-Pro Responses Configuration Workflow in Codex

OfficialGitHub (the official deepseek-ai/deepseek-harness repository) and the official X account @deepseekai2026-08-13

DeepSeek Harness v0.1: Launching and Configuring the Official Plugin-Based Agent Framework

MediaXSCT Bench (a scenario-based model selection and evaluation platform)

XSCT Bench “Autonomous Planning and Execution” Case: Agent Tool-Calling Prompt and Generated Result for deepseek-v4-pro

DeepSeek V4 Pro

Related reviews

OfficialDeepSeek API Docs2026-08-13

DeepSeek-V4-Pro Official Release: Reasoning and Agent Upgrades

MediaMindStudio2026-08-13

DeepSeek-V4-Pro-0813: MindStudio's Eight-Task Coding and Agent Hands-on Comparison

MediaReuters2026-08-13

Reuters DeepSeek-V4-Pro-0813: Official Pricing vs. Independent Index

MediaXSCT Bench (xsctbench.com, scenario-based model-selection evaluation)

DeepSeek-V4-Pro XSCT Bench Two-Case Comparison: Strong Planning, Weak Clarification