On this page
On this page
Providers
ds4
ds4 serves DeepSeek V4 Flash from a local
Metal backend with an OpenAI-compatible /v1 API. OpenClaw connects to ds4
through the generic openai-completions provider family.
ds4 is not a bundled OpenClaw provider plugin. Configure it under
models.providers.ds4, then select ds4/deepseek-v4-flash.
| Property | Value |
|---|---|
| Provider id | ds4 |
| Plugin | none (config-only) |
| API | OpenAI-compatible Chat Completions (openai-completions) |
| Base URL | http://127.0.0.1:18000/v1 (suggested) |
| Model id | deepseek-v4-flash |
| Tool calls | OpenAI-style tools / tool_calls |
| Reasoning | DeepSeek-style thinking and reasoning_effort |
Requirements
- macOS with Metal support.
- A working ds4 checkout with
ds4-serverand the DeepSeek V4 Flash GGUF file. - Enough memory for the context you choose; larger
--ctxvalues allocate more KV memory at server startup.
Quickstart
Start ds4-server
Replace <DS4_DIR> with your ds4 checkout path.
Verify the OpenAI-compatible endpoint
The response should include deepseek-v4-flash.
Add the OpenClaw provider config
Add the config from Full config, then run a one-shot model check:
Full config
Use this config when ds4 is already running on 127.0.0.1:18000.
Keep contextWindow aligned with ds4-server --ctx. Keep maxTokens aligned
with --tokens unless you intentionally want OpenClaw to request less output
than the server default.
On-demand startup
OpenClaw can start ds4 only when a ds4/... model is selected. Add
localService to the same provider entry:
command must be an absolute executable path. Shell lookup and ~ expansion
are not used. See Local model services for
every localService field.
Think Max
ds4 applies Think Max only when both are true:
ds4-serverstarts with--ctx 393216or higher.- The request uses
reasoning_effort: "max"(or the equivalent ds4 effort field).
If you run that large context, update both the server flags and OpenClaw model metadata:
Test
Direct HTTP check, bypassing OpenClaw:
OpenClaw model routing (same as the Quickstart check):
Full agent and tool-call smoke test, with context of at least 32768:
Expected result:
executionTrace.winnerProviderisds4executionTrace.winnerModelisdeepseek-v4-flashtoolSummary.callsis at least1finalAssistantVisibleTextstarts withtool-ok
Troubleshooting
curl /v1/models cannot connect
ds4 is not running or not bound to the host/port in baseUrl. Start
ds4-server, then retry:
500 prompt exceeds context
The configured --ctx is too small for the OpenClaw turn. Raise
ds4-server --ctx, then update models.providers.ds4.models[].contextWindow
to match. Full agent turns with tools need substantially more context than a
direct one-message curl request.
Think Max does not activate
ds4 only uses Think Max when --ctx is at least 393216 and the request
asks for reasoning_effort: "max". Smaller contexts fall back to high
reasoning.
The first request is slow
ds4 has a cold Metal residency and model warmup phase. Set
localService.readyTimeoutMs: 300000 when OpenClaw starts the server on
demand.