Updated 2026-06-17
DeepSeek Crush setup: use the official `crush.json` provider contract instead of guessing at model metadata
Crush is one of the richer current DeepSeek agent-integration pages because it does more than say 'paste your API key here.' DeepSeek's official docs give a concrete OpenAI-compatible provider schema for `crush.json`, define DeepSeek V4 Pro and Flash model entries, set the DeepSeek base URL, and pair that config with an environment-based API key. That makes this a strong long-tail setup page for developers searching how to connect Crush to DeepSeek without inventing the provider block from scratch.
1. What DeepSeek officially says Crush supports
DeepSeek describes Crush as a terminal AI coding agent built by Charm that supports multi-model switching, LSP integration, MCP servers, and agentic coding workflows.
The important DeepSeek-first point is that the official docs do not treat Crush as a vague OpenAI-compatible maybe. They publish an explicit provider schema, which is exactly what support-search traffic usually needs.
Sources checked
- DeepSeek official Crush integration guide - Primary source for the install flow and `crush.json` provider schema.
2. Install Crush first, then verify the binary
DeepSeek's page starts with a normal install-and-verify flow: install Node.js, run `npm install -g @charmland/crush`, then confirm the CLI with `crush --version`.
The docs also mention a macOS Homebrew path. That is useful, but it does not change the DeepSeek provider contract. Install source is less important than ending up on a working Crush binary before you edit configuration files.
npm install -g @charmland/crush
crush --version
# macOS alternative from the official DeepSeek docs
brew install charmbracelet/tap/crush3. Add DeepSeek as an OpenAI-compatible provider in `crush.json`
This is the core value of the official page: DeepSeek gives a ready-made provider block rather than forcing users to guess at field names, context-window metadata, or reasoning support flags.
On Linux and macOS, the file path is `~/.config/crush/crush.json`. On Windows, it lives under the user's profile directory. Keep the DeepSeek base URL at `https://api.deepseek.com`, then define the Pro and Flash models explicitly so Crush can present them cleanly in the switcher.
{
"$schema": "https://charm.land/crush.json",
"providers": {
"deepseek": {
"type": "openai-compat",
"base_url": "https://api.deepseek.com",
"api_key": "$DEEPSEEK_API_KEY",
"models": [
{
"id": "deepseek-v4-pro",
"name": "DeepSeek-V4-Pro",
"context_window": 1048576,
"default_max_tokens": 32768,
"can_reason": true
},
{
"id": "deepseek-v4-flash",
"name": "DeepSeek-V4-Flash",
"context_window": 1048576,
"default_max_tokens": 32768,
"can_reason": true
}
]
}
}
}Sources checked
- DeepSeek official Crush integration guide - Provides the official `crush.json` structure, model IDs, and context metadata.
4. Export `DEEPSEEK_API_KEY` instead of hardcoding credentials
DeepSeek's official schema references `$DEEPSEEK_API_KEY`, so the practical credential boundary is still the environment variable rather than a raw secret committed into the JSON file.
That is the safe default. Keep the provider metadata in `crush.json`, but load the actual key through the environment so rotation stays simple and local.
export DEEPSEEK_API_KEY="<your DeepSeek API key>"5. Use the model switcher deliberately: Pro for harder work, Flash for loops
DeepSeek's docs say to start Crush, press `Ctrl+L` or type `/model`, then pick the DeepSeek provider and select either DeepSeek V4 Pro or DeepSeek V4 Flash.
That means Crush is one of the clearer official places to express the site's recurring routing rule: Pro for harder reasoning, review, and architecture work; Flash for cheaper repeated edit loops and wider fan-out.
If you want the pricing and routing logic behind that rule, continue with `/guides/deepseek-v4-pro-vs-flash` and `/guides/deepseek-openai-vs-anthropic-api-routing`.
6. Common failure pattern: wrong provider metadata, not bad model output
When Crush fails with DeepSeek, the first place to look is the provider block. A bad `base_url`, a typo in the model ID, or missing model metadata will usually break the workflow before model quality even enters the picture.
That is why the official DeepSeek schema matters so much. Start from the published shape, then customize only after you have a stable baseline session.
7. Where this fits in DeepSeek-first site architecture
This guide exists to capture DeepSeek support intent around a real coding agent. It does not imply that Crush is sold on `/pricing`, and it should not be turned into a new plan card or provider inventory claim.
The correct user path is simple: learn the provider setup here, then use `/pricing` only if you need an in-stock DeepSeek key route. For other terminal setups, compare `/guides/deepseek-opencode-setup`, `/guides/deepseek-deep-code-cli`, and `/guides/reasonix-deepseek-coding-agent`.
FAQ
How do I install Crush for DeepSeek?
DeepSeek's official guide installs Crush with `npm install -g @charmland/crush`, then verifies the binary with `crush --version`.
Which file should I edit for DeepSeek Crush setup?
On Linux and macOS, DeepSeek's page uses `~/.config/crush/crush.json` for the provider configuration.
Which base URL should the DeepSeek Crush provider use?
Use `https://api.deepseek.com`, which is the base URL shown in the official DeepSeek Crush provider schema.
Can I use both DeepSeek V4 Pro and Flash in Crush?
Yes. DeepSeek's official provider schema includes both `deepseek-v4-pro` and `deepseek-v4-flash`, and the docs tell you to switch models through Crush's model selector.
Should I store my DeepSeek API key directly in crush.json?
The official DeepSeek example references `$DEEPSEEK_API_KEY`, so the safer baseline is to keep the key in the environment and keep the file focused on provider metadata.
The official Crush integration page is useful because it removes guesswork: install the CLI, copy the published `crush.json` provider shape, keep the DeepSeek key in `DEEPSEEK_API_KEY`, and switch between Pro and Flash inside the tool. That is the right order if you want a reliable DeepSeek-first coding-agent setup instead of a hand-built config experiment.
Related model comparisons
Continue from this guide into structured DeepSeek-first comparison pages with model tables, routing advice, and pricing context.