OpenCode Go 403 RegionError: "only available hosted in China and requires explicit opt in"
On July 31, 2026, DeepSeek released the final version of DeepSeek V4 Flash, and OpenCode Go began serving it from DeepSeek's own API, according to OpenCode staff replies quoted in the issue threads. That API runs in China, so Go refuses the request until the workspace agrees to it. Sessions that were working stopped in the middle. This entry explains what the switch does and lists every way to keep working, including the ones that do not involve us.
Last verified September 17, 2026 against OpenCode Go docs, OpenCode Zen docs, opencode issue #39845, opencode issue #39872 · 5 min read
| Provider | OpenCode Go, the $10 per month subscription (opencode.ai/zen/go/v1) |
| HTTP status | 403 Forbidden |
| Error type | RegionError |
| Message | The latest version of this model is only available hosted in China and requires explicit opt in |
| Models | Reported for deepseek-v4-flash, deepseek-v4.1-flash and deepseek-v4-pro |
| When it happens | You call a DeepSeek model on OpenCode Go and the workspace has not switched on "Enable models hosted in China" |
| Can you wait it out? | No. It is a policy block, not a rate limit. Retrying returns the same 403 |
- If China hosting is acceptable to you: open the link in the error, switch on "Enable models hosted in China", and retry. Nothing else changes.
- If it is not: pick a different model on Go, or add a provider that runs DeepSeek V4 in the United States. The config block is below.
- The model still shows up in
/modelseither way, so an agent can select it and then fail on every turn.
What the error looks like
{
"type": "error",
"error": {
"type": "RegionError",
"message": "The latest version of this model is only available hosted in China and requires explicit opt in: https://opencode.ai/workspace/wrk_.../go"
}
}In opencode itself the run ends with the message text. Tools that call Go through another client show it as API error: [403] Forbidden with the same JSON. Two details cause most of the confusion in the bug reports:
- The model is still returned by
GET /zen/go/v1/models. Being listed does not mean your workspace may call it. - The status is 403, which many clients treat as a bad API key. The key is fine.
Why it started on July 31
Until that day, the preview build of DeepSeek V4 Flash worked on Go without any switch. The final build, DeepSeek-V4-Flash-0731, kept the same model name, and Go began serving it through DeepSeek's official API. OpenCode added a workspace setting that must be switched on before any request is sent there. Reports since then show the same block on DeepSeek V4.1 Flash and DeepSeek V4 Pro.
The Go docs list DeepSeek models with 0 days of retention and a footnote: the zero-retention agreement with DeepSeek "is renewed monthly" and the current one runs through September 30, 2026. Whether that is enough is your call or your employer's. The most upvoted replies in the issue thread come from people for whom it is not, usually because of a company rule about where source code may be sent.
Your options, side by side
| Option | Where the model runs | Retention | Billing |
|---|---|---|---|
| Turn on "Enable models hosted in China" in the Go workspace | DeepSeek's own API, in China | OpenCode lists 0 days under an agreement with DeepSeek that is renewed monthly | Go subscription. Go meters DeepSeek V4 Flash at $0.30 in / $1.20 out in peak hours and $0.15 / $0.60 off-peak, against a $30 monthly limit |
| Use a different Go model (GLM, Kimi, Qwen, MiniMax) | Not stated per model in the Go docs | OpenCode lists 0 days for these | Go subscription |
| OpenCode Zen, pay as you go | The Zen docs say "All our models are hosted in the US"; users in the issue thread asked whether that covers DeepSeek and had no staff answer when we checked | Zero retention per the Zen docs, with listed exceptions | $0.14 in / $0.28 out per million tokens for DeepSeek V4 Flash |
| A US host added as a custom provider (Inference APIs is one) | Ours: Together AI GPUs in the United States, never DeepSeek's API | Ours: zero retention upstream since September 17, 2026, details on /trust | Ours: $0.19 in / $0.38 out / $0.04 cached per million tokens, prepaid, no quota window |
OpenCode's rows are taken from its docs and issue tracker as of September 17, 2026. They can change, so check the linked pages. Our row is measured and documented on our trust page.
Fix 1: opt in
Open the workspace link from the error message while signed in as the workspace owner, go to the Go settings and switch on "Enable models hosted in China". The next request works. The switch is on the workspace's Go page on opencode.ai, not in the opencode app. A few users reported that they could not find it there; that is a question for OpenCode support.
Fix 2: use another model on Go
Every report of this error that we found names a DeepSeek model. GLM, Kimi, Qwen and MiniMax models on Go were not mentioned. Go meters each model at its own token price against its own monthly limit, so check the usage table in the Go docs before you switch: GLM 5.3 Flash is listed at $0.15 in and $0.50 out with a $60 limit, while DeepSeek V4 Flash is listed at $0.30 in and $1.20 out during peak hours with a $30 limit.
Fix 3: run DeepSeek V4 on US GPUs as a custom provider
opencode accepts any OpenAI-compatible endpoint as a provider. DeepSeek V4 is an open-weight model, so hosts other than DeepSeek can serve the same weights. This block adds ours next to Go; you can keep both and choose per session.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"inferenceapis": {
"npm": "@ai-sdk/openai-compatible",
"name": "Inference APIs",
"options": {
"baseURL": "https://api.inferenceapis.com/v1",
"apiKey": "{env:INFERENCE_API_KEY}"
},
"models": {
"deepseek-ai/DeepSeek-V4-Flash": { "name": "DeepSeek V4 Flash", "limit": { "context": 1000000, "output": 32768 } },
"deepseek-ai/DeepSeek-V4.1-Flash": { "name": "DeepSeek V4.1 Flash", "limit": { "context": 1000000, "output": 32768 } },
"deepseek-ai/DeepSeek-V4-Pro": { "name": "DeepSeek V4 Pro", "limit": { "context": 1000000, "output": 32768 } }
}
}
}
}export INFERENCE_API_KEY="your-key"
opencode # then /models and pick inferenceapis/deepseek-ai/DeepSeek-V4-FlashWe ran this exact file with opencode 1.18.31 on September 17, 2026. The task was to fix a bug in a Python file, write tests and run them. DeepSeek V4 Flash finished in 12 seconds and DeepSeek V4 Pro in 17 seconds, both with passing tests. All our DeepSeek V4 Flash calls for that test, about 49,000 input tokens and 1,300 output tokens, were billed $0.007 in total.
Facts to check before you trust any host, ours included:
- Same build.
deepseek-ai/DeepSeek-V4-Flashhere is the 0731 release.deepseek-ai/DeepSeek-V4-Prois the 0813 release. - Location. The models run on Together AI's GPUs in the United States. Requests are never forwarded to DeepSeek.
- Retention. Zero retention is switched on with the upstream host. We store the model id and token counts for billing, not prompts or outputs. The trust page has the detail.
- Repeated context is cheaper. opencode resends the conversation on every turn. The repeated part is billed at $0.04 per million tokens on DeepSeek V4 Flash instead of $0.19, with nothing to configure.
- Responses API.
/v1/responsesworks for every chat model here, so Codex CLI can use the same key. The Codex CLI guide has the config.
The full walk-through, with GLM 5.3 and Kimi K2.7 Code added, is in the opencode guide. Prices for every model are on the pricing page.
How to check where any host runs a model
"OpenAI-compatible" says nothing about where the GPUs are. A reseller can forward your request to the model maker's API and you would not see a difference in the response. Ask, or look in the docs, for these:
1. Which company operates the GPUs that serve this model, and in which country?
2. Is the request forwarded to the model maker's own API at any point?
3. Are prompts and outputs stored after the response is returned? For how long, and by whom?A price that matches the model maker's list price to the cent is a hint that the request is being forwarded to the model maker. It is not proof. A written answer to question 2 is.
Frequently asked questions
Is DeepSeek V4 Flash on OpenCode Zen hosted in the United States?
The Zen docs say all Zen models are hosted in the US and that providers keep no data, with exceptions listed for some free models. Zen's DeepSeek price equals DeepSeek's own list price, and users asked in issue #39845 whether Zen's DeepSeek is hosted outside China. We found no staff answer in that thread as of September 17, 2026. Ask OpenCode directly if it matters for you.
If I opt in, does zero data retention still apply?
OpenCode's Go docs list DeepSeek models at 0 days of retention, under an agreement with DeepSeek that is renewed monthly. The request is still processed in China. Retention and location are separate questions.
When my Go allowance runs out and Go falls back to my Zen balance, does the host change?
The Go docs describe the fallback as a billing change. They do not say the request is routed to a different host, and you keep calling the Go endpoint. Treat the hosting as unchanged unless OpenCode says otherwise.
Can I stay on the old preview build?
Not on Go. The model name did not change and Go serves the current build only.
Is a US-hosted DeepSeek V4 the same model?
The weights are the same public release. Hosts differ in numeric precision, context limit and speed, so check those. Ours are on each model page, with measured speed and the tool-calling checks we ran.
Where Inference APIs fits
The last option above is what we sell: DeepSeek V4 Flash, V4.1 Flash and V4 Pro on GPUs in the United States, billed per token from a prepaid balance. We are not the cheapest place to run DeepSeek; DeepSeek's own API is. The reason to pay the difference is that the request never goes to China and is not stored.
Something changed or wrong? Tell us and we will re-verify the entry.
