On this page
On this page
Providers
DeepSeek
DeepSeek provides powerful AI models with an OpenAI-compatible API.
| Property | Value |
|---|---|
| Provider | deepseek |
| Auth | DEEPSEEK_API_KEY |
| API | OpenAI-compatible |
| Base URL | https://api.deepseek.com |
Install plugin
Install the official plugin:
Installation applies to a running Gateway automatically; otherwise it takes effect on the next startup. See Apply changes and inspect.
Getting started
Get your API key
Create an API key at platform.deepseek.com.
Run onboarding
Prompts for your API key and sets deepseek/deepseek-v4-pro as the default model.
Verify models are available
To inspect the plugin's static catalog without a running Gateway:
Onboarding preserves your model entries and leaves generated catalog rows to discovery. With models.mode: "replace", it also writes the built-in catalog because that mode skips discovery.
Non-interactive setup
For scripted or headless installations, pass all flags directly:
Built-in catalog
| Model ref | Name | Input | Context | Max output | Notes |
|---|---|---|---|---|---|
deepseek/deepseek-flash |
DeepSeek V4.1 Flash | text, image | 1,000,000 | 384,000 | Main Flash model |
deepseek/deepseek-v4-flash |
DeepSeek V4 Flash | text | 1,000,000 | 384,000 | Fast V4 thinking-capable surface |
deepseek/deepseek-v4-pro |
DeepSeek V4 Pro | text | 1,000,000 | 384,000 | Onboarding default |
deepseek/deepseek-v4-flash-vision-exp |
DeepSeek V4 Flash Vision (Experimental) | text, image | 1,000,000 | 384,000 | Experimental image understanding |
OpenClaw's local costs are estimates. deepseek/deepseek-flash uses DeepSeek's peak
rates: $0.30 per million input tokens, $1.20 per million output tokens, and
$0.006 per million cached input tokens. Published off-peak rates are half those amounts.
Legacy rows retain their earlier bundled metadata. DeepSeek still accepts
deepseek-v4-flash and deepseek-v4-flash-vision-exp, routes them to V4.1 Flash,
and bills them at current Flash rates. Existing explicit selections remain valid in OpenClaw.
DeepSeek can change rates; its
Models & Pricing page is
authoritative for billing.
For image inputs, select deepseek/deepseek-flash. The legacy
deepseek/deepseek-v4-flash-vision-exp selection also retains image support.
deepseek/deepseek-flash accepts
PNG, JPEG, GIF, and WebP images through the same API and API key. See
DeepSeek vision for image limits.
Thinking and tools
When a DeepSeek model emits DSML tool markup as text, including through OpenRouter
or another OpenAI-compatible provider, OpenClaw recovers
valid calls, tool_calls, tool_call, and function_calls blocks into tool
calls instead of showing their payloads in chat. This includes doubled fullwidth
markers with a separator space. Direct provider calls and tool-free finalization
hide these blocks without recovering tools. Malformed or unfinished blocks are
also hidden without executing them; existing tool permissions still apply to
recovered calls. Native tool calls take precedence when the same response also
contains DSML, so recovered duplicates do not execute. Routing through OpenRouter
keeps OpenRouter's reasoning request format.
DeepSeek V4 thinking sessions require replayed assistant messages from a
thinking-enabled turn to include reasoning_content on follow-up requests.
OpenClaw's DeepSeek plugin backfills that field automatically, so normal
multi-turn tool use works on deepseek/deepseek-flash, deepseek/deepseek-v4-flash,
deepseek/deepseek-v4-flash-vision-exp, and deepseek/deepseek-v4-pro even when history came from another
OpenAI-compatible provider (no native reasoning_content) or from a plain
assistant message. No /new required after switching providers mid-session.
When thinking is disabled (including the UI None selection), OpenClaw
sends thinking: { type: "disabled" } and strips replayed reasoning_content
from outgoing history, keeping the session on the non-thinking DeepSeek path.
Fresh onboarding selects deepseek/deepseek-v4-pro. To select Flash:
Live testing
To run only the DeepSeek V4 direct-model checks from the modern model live suite:
Verifies both V4 models complete and that thinking/tool follow-up turns preserve the replay payload DeepSeek requires.
To check the experimental vision model with the same DEEPSEEK_API_KEY:
This runs text, generated-image recognition, and thinking replay checks against the selected model.
Config example
Related
Choosing providers, model refs, and failover behavior.
Running DeepSeek V4 Flash from a local OpenAI-compatible ds4 server.
Full config reference for agents, models, and providers.
Web search
The same plugin can provide web_search for any model. Search uses DeepSeek's
search engine directly, not a chat completion. Install the plugin as above, then
choose DeepSeek in Settings → Search or openclaw configure --section web.
The key is optional when DEEPSEEK_API_KEY is set in the Gateway environment
or models.providers.deepseek.apiKey is configured for DeepSeek's own API. Credential precedence is
plugin search key, environment key, then model-provider key. Search treats
DEEPSEEK_API_KEY as a DeepSeek key. It reuses the model-provider key only while
models.providers.deepseek.baseUrl and every model baseUrl under it are unset
or use https://api.deepseek.com (any path); a key configured for another base
URL is not sent to DeepSeek and does not make DeepSeek eligible for
auto-detection. Only routes in models.providers are checked, not routes that
come only from an agent's models.json. The plugin search key and model-provider
fallback support SecretRefs through the standard secret preparation flow. Search
does not reuse API keys stored only in model auth profiles.
With DeepSeek selected as the search provider, changing its search key or SecretRef hot-applies through the Gateway's secrets runtime without replacing the plugin or waiting for unrelated agent turns. Plugin enablement and explicit plugin reloads still use normal lifecycle settlement.
With no explicit search provider, credential auto-detection considers DeepSeek
after Parallel (order 80), before configured endpoint providers. Select
provider: "deepseek" to prevent automatic fallback to another search service.
Search always calls https://api.deepseek.com/v1/tools/search; a configured chat
base URL does not redirect search to a proxy. When chat uses a proxy, store the
proxy key in a DeepSeek auth profile or in models.providers.deepseek.apiKey
with auth: "api-key" (otherwise DeepSeek auth profiles and DEEPSEEK_API_KEY
take precedence over the config key), and give search a DeepSeek key through the
plugin search key or DEEPSEEK_API_KEY. A proxy that forwards a DeepSeek key
also needs that key set for search.
Queries and results
query: 1–128 Unicode characters. Oversized queries are rejected, never truncated.count: 1–10 results, defaulting totools.web.search.maxResultsor 5.- Use query operators such as
site:,-site:,lang:,after:,before:, and quoted phrases directly inquery. Separate structured filter parameters are not supported and return an error rather than being ignored. - Results contain titles, URLs, model-oriented summaries (falling back to short snippets), publication dates, and site names. Core validates URLs/dates and wraps returned prose as untrusted web content. Full page content is not requested.
Search uses the shared timeout and cache settings. Cached results are separated by query, result count, and credential. Errors are not cached or automatically retried by the DeepSeek adapter.
DeepSeek documents a limit of 5 search requests per second per account and a
price of $0.75 per 1,000 successful non-empty search requests. Empty results and
failed requests are not billed. See DeepSeek Search & Fetch
for current pricing and account limits. This plugin integration adds search only;
web_fetch continues to use its existing local extraction and configured fallbacks.