DeepSeek in OpenCode: switch models, pay off-peak

Terminal-first coding agent with 75+ providers

PEAK 01:00–04:00 & 06:00–10:00 UTC WEEKDAYS

OpenCode is an MIT-licensed terminal AI coding agent with a desktop app and IDE extension. It supports 75+ LLM providers through Models.dev, local models, and hot-swapping between providers without restarting your session. OpenCode Go ($10/month) and Go Plus ($40/month) are optional subscriptions that bundle a curated 30-model line-up, including DeepSeek V4.1 Flash, behind one API key.

Switch OpenCode to DeepSeek in 4 steps

Step 1

Install OpenCode

curl -fsSL https://opencode.ai/install | bash
Or use `npm install -g opencode-ai`. Verify with `opencode --version`.
Step 2

Authenticate DeepSeek

opencode auth login
Choose DeepSeek and paste your API key. The credential is stored locally, not in the repo.
Step 3

Start a session on DeepSeek V4.1 Flash

opencode -m deepseek/deepseek-v4.1-flash
Inside the TUI, type /models to switch interactively. The model id format is provider/model.
Step 4

Make the choice permanent

printf '{\n "$schema": "https://opencode.ai/config.json",\n "model": "deepseek/deepseek-v4.1-flash"\n}\n' > opencode.json
Commit opencode.json to the project so every teammate starts on the same model.

DeepSeek peak and off-peak pricing in OpenCode

⚠ Weekday peak, 01:00–04:00 and 06:00–10:00 UTC, costs 2x the off-peak rate.

DeepSeek peak rates apply on weekdays from 01:00-04:00 and 06:00-10:00 UTC. V4.1 Flash costs $0.30/M input and $1.20/M output at peak, versus $0.15/M and $0.60/M off-peak. A 5M-input / 500K-output coding day costs $2.10 at peak and $1.05 off-peak. Weekends are entirely off-peak.

Model, $/M tokensInput off-peakInput peakCache hit off-peakCache hit peakOutput off-peakOutput peakExample day, off-peak / peak
DeepSeek V4.1 Flash$0.15$0.30$0.003$0.006$0.60$1.20$1.05 / $2.10
DeepSeek V4 Pro$0.66$1.32$0.022$0.044$1.98$3.96$4.29 / $8.58

The example day is 5M input and 500K output tokens with no cache hits. Off-peak starts at 10:00 UTC on weekdays and runs all weekend: peak hours in your time zone.

Commands checked against https://opencode.ai/docs/models/ on 2026-10-24. Rates from DeepSeek API pricing, checked 2026-10-17.

Questions

How do I switch OpenCode to DeepSeek?

1. Install OpenCode. 2. Authenticate DeepSeek. 3. Start a session on DeepSeek V4.1 Flash. 4. Make the choice permanent. The commands for each step are above.

How much does DeepSeek cost in OpenCode?

DeepSeek V4.1 Flash is $0.15/M input and $0.60/M output off-peak, and $0.30/M and $1.20/M during weekday peak hours (01:00–04:00 and 06:00–10:00 UTC).

When is DeepSeek off-peak?

Every hour outside Mon–Fri 01:00–04:00 and 06:00–10:00 UTC, plus weekends and Chinese public holidays. Off-peak is 50% cheaper; peak costs 2x.