Find a model

Browse the full catalog →

To use DeepSeek in OpenCode, run /connect, choose deepseek, paste a DeepSeek key and select deepseek/deepseek-v4-flash. OpenRouter and TrustedRouter are the other two routes through gateways. Provider IDs and setup checked .

RouteCredentialModel selectorWho serves the request
Direct DeepSeekDEEPSEEK_API_KEYdeepseek/deepseek-flash — DeepSeek V4.1 Flash 1017
deepseek/deepseek-v4-flash — V4 Flash
DeepSeek at https://api.deepseek.com
OpenRouterOPENROUTER_API_KEYopenrouter/deepseek/deepseek-v4.1-flashThe provider selected through OpenRouter
TrustedRouterTRUSTEDROUTER_API_KEYtrustedrouter/deepseek/deepseek-v4.1-flashA catalog provider selected through https://api-azure.trustedrouter.com/v1

V4 Flash and V4.1 Flash are different models. DeepSeek's own guide selects V4 Flash; models.dev also lists the direct deepseek/deepseek-flash selector as DeepSeek V4.1 Flash 1017, the October 17 update. The gateway examples select V4.1 Flash. Sources: OpenCode provider catalog, DeepSeek's guide and OpenRouter's guide.

Connect DeepSeek directly

Use OpenCode v1.18.30 or later, the minimum version recommended by DeepSeek's guide.

  1. Create a DeepSeek API key.
  2. Run /connect, select deepseek, and enter that key.
  3. Run /models and select DeepSeek-V4-Flash (deepseek/deepseek-v4-flash).

Connect through OpenRouter

Run /connect, choose OpenRouter, and enter an OpenRouter key; then select openrouter/deepseek/deepseek-v4.1-flash with /models.

The model is already in OpenCode's OpenRouter catalog. OpenRouter's setup guide shows only the 1.x provider.openrouter.models shape. To add or override the model in V2, use providers.openrouter.models:

OpenCode V2 — OpenRouter model addition

{
  "$schema": "https://opencode.ai/config.json",
  "model": "openrouter/deepseek/deepseek-v4.1-flash",
  "providers": {
    "openrouter": {
      "models": {
        "deepseek/deepseek-v4.1-flash": {
          "limit": {
            "context": 1048576,
            "output": 393216
          },
          "name": "DeepSeek V4.1 Flash"
        }
      }
    }
  }
}

OpenRouter limits in this example come from models.dev: 1,048,576 context tokens and 393,216 output tokens.

Connect through TrustedRouter

Create a key at Console → API Keys, connect TrustedRouter with /connect, and add this model to your config.

DeepSeek V4.1 Flash has 1,048,576 context tokens and 393,216 output tokens in the TrustedRouter catalog. Choose the configuration for your OpenCode generation, then select trustedrouter/deepseek/deepseek-v4.1-flash.

OpenCode V2

{
  "$schema": "https://opencode.ai/config.json",
  "model": "trustedrouter/deepseek/deepseek-v4.1-flash",
  "providers": {
    "trustedrouter": {
      "models": {
        "deepseek/deepseek-v4.1-flash": {
          "limit": {
            "context": 1048576,
            "output": 393216
          },
          "name": "DeepSeek V4.1 Flash"
        }
      }
    }
  }
}

OpenCode 1.x

{
  "$schema": "https://opencode.ai/config.json",
  "model": "trustedrouter/deepseek/deepseek-v4.1-flash",
  "provider": {
    "trustedrouter": {
      "models": {
        "deepseek/deepseek-v4.1-flash": {
          "limit": {
            "context": 1048576,
            "output": 393216
          },
          "name": "DeepSeek V4.1 Flash"
        }
      }
    }
  }
}

The built-in provider supplies its endpoint, runtime and connection; see the full TrustedRouter setup and troubleshooting guide.

What does DeepSeek through TrustedRouter cost?

DeepSeek V4.1 Flash has 21 prepaid provider routes. Ranked by input plus output price, the lowest is Engy at $0.03165 input / $0.1266 output per million tokens; the highest is IO Intelligence at $0.865311 / $3.537837. These TrustedRouter retail rates include the standard markup and use the 4,000-token context tier. Prices collected ; IO Intelligence: ; all provider routes and limits.

Compare the selected provider's privacy and limits as well as price. See gateway fees and a monthly workload.

Which DeepSeek route should I choose?

Direct DeepSeek is simplest for a DeepSeek-only setup and has no gateway fee; choose a gateway when one key across model families and provider fallback are useful.

TrustedRouter offers 600+ models and 100+ providers, Open, ZDR and TEE privacy tiers, and daily, weekly and monthly key limits. OpenRouter's Standard fee is 5.5% on credits purchased; TrustedRouter's standard token markup is 5.5%. Compare OpenRouter's terms and the fee table.

How does OpenCode handle DeepSeek thinking?

According to OpenCode's model reference, OpenCode reads streamed reasoning from reasoning, reasoning_content or reasoning_text, and restores that field in prior assistant messages.

OpenCode's model reference documents compatibility.reasoningField and requireReasoning; the latter defaults to true for DeepSeek or when a reasoning field is set.

Questions

How do I use DeepSeek directly in OpenCode?

DeepSeek recommends OpenCode v1.18.30 or later. Run /connect, select deepseek, enter a DeepSeek key, then select DeepSeek-V4-Flash.

How do I use DeepSeek through TrustedRouter in OpenCode?

Connect TrustedRouter and add deepseek/deepseek-v4.1-flash to its models map, then select trustedrouter/deepseek/deepseek-v4.1-flash.

Workspace access

Sign in

Choose a sign in method to access your TrustedRouter workspace.

New to TrustedRouter?

By continuing you agree to the terms of service and privacy policy.