DeepSeek has quietly become the price-performance story in coding models. DeepSeek V4 Pro, released in April 2026, hits 80.6% on SWE-bench Verified, frontier-class scores at a fraction of what Claude or GPT charge per token. If you drive OpenClaw or OpenCode, it’s one of the best value models you can point them at.

Both agents speak the OpenAI-compatible API format, so wiring DeepSeek in takes a small config block. Here’s how to do it in each, which model to choose, and the one reliability gotcha to plan around.

Which DeepSeek model to use

ModelSWE-bench VerifiedContextBest for
DeepSeek V4 Pro80.6%1MDefault — frontier coding, cheap
DeepSeek V4 Flash~79%1MHigh volume, even cheaper
DeepSeek V3.2older gen164KLegacy budget option

Start with V4 Pro. It’s a Mixture-of-Experts model (1.6T total parameters, ~49B active) with a 1M-token context window, and DeepSeek made a 75% price cut permanent in May 2026. So you get frontier coding scores at sub-dollar pricing. Drop to V4 Flash if you’re running heavy volume and want to shave cost further for a small quality trade. There’s a fuller breakdown in best DeepSeek models for OpenClaw.

Setup in OpenClaw

OpenClaw config lives at ~/.openclaw/openclaw.json. Two things are required: the provider definition and the model allowlist. Forgetting the allowlist is the most common reason a model “doesn’t show up.”

Add DeepSeek under models.providers:

{
  "models": {
    "providers": {
      "deepseek": {
        "baseUrl": "https://api.deepseek.com/v1",
        "apiKey": "your-deepseek-api-key",
        "api": "openai-completions",
        "models": [
          {
            "id": "deepseek-v4-pro",
            "name": "DeepSeek V4 Pro",
            "reasoning": true,
            "contextWindow": 1000000,
            "maxTokens": 65536
          }
        ]
      }
    }
  }
}

Then allow the model under agents.defaults.models using the fully-qualified provider/model name:

{
  "agents": {
    "defaults": {
      "models": ["deepseek/deepseek-v4-pro"]
    }
  }
}

Apply it:

openclaw gateway config.apply --file ~/.openclaw/openclaw.json

Run /models to confirm it registered, then /model deepseek/deepseek-v4-pro to switch to it. Full provider walkthrough: OpenClaw custom provider setup.

Setup in OpenCode

OpenCode keeps credentials and provider config separate. First store the credential:

opencode auth login

Choose Other, enter a provider ID (use deepseek), and paste your DeepSeek API key. The credential lands in ~/.local/share/opencode/auth.json.

Then add a matching provider block in opencode.json (the provider ID must match what you used during auth):

{
  "provider": {
    "deepseek": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://api.deepseek.com/v1"
      },
      "models": {
        "deepseek-v4-pro": { "name": "DeepSeek V4 Pro" }
      }
    }
  }
}

Restart OpenCode and pick the model from /models. If it doesn’t appear, the usual culprits are a provider-ID mismatch between the credential and the config, invalid JSON, or a model ID that doesn’t match DeepSeek’s API. More detail: OpenCode custom provider setup.

The easiest path: one endpoint for both

DeepSeek’s own API is cheap but not always reliable: it returns 503s during peak hours, and time-to-first-token can lag. If you’d rather not build retry logic or juggle a separate DeepSeek account, route through a gateway instead:

  • haimaker.ai — point either agent at one OpenAI-compatible endpoint (https://api.haimaker.ai/v1) and get DeepSeek V4 Pro alongside hundreds of other models, with unified billing and the ability to fall back to another model when DeepSeek is busy. Same config blocks as above; just swap the baseUrl / baseURL and use your haimaker key.
  • DeepSeek directly — lowest nominal price if you only ever use DeepSeek and don’t mind handling the occasional retry. Set a generous request timeout (60s+).

GET A DEEPSEEK ENDPOINT

The bottom line

DeepSeek V4 Pro is the cheap-frontier sweet spot for coding agents in 2026, and it drops into both OpenClaw and OpenCode with a short OpenAI-compatible provider block. Use it directly if you want the rock-bottom token price and can tolerate the occasional 503, or route it through a gateway if you’d rather have failover and one bill for every model.