anomalyco / anomalyco/opencode
Console Go (zen/go/v1): deepseek-v4-flash returns RegionError requiring China opt-in, no programmatic opt-in path
Open
@StarpTech is already working on this.
Since Jul 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
deepseek-v4-flash is listed in GET /zen/go/v1/models but every completion request fails with a RegionError 403 that demands a manual opt-in via a workspace link. API-only consumers (agents/gateways) cannot opt in — the error only contains a browser URL.
Repro
curl -s https://opencode.ai/zen/go/v1/chat/completions \
-H "Authorization: Bearer <key>" -H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'
Response (reproduced 2026-07-31, multiple times)
{"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_01KJHRCVJTA9W5D147MYK8K5JD/go"}}
Impact
- Model appears healthy in
/modelslist → agents pick it as default, then every turn fails (403, non-retryable) - No API-surface opt-in exists; the only path is a human clicking a workspace link
- HTTP status observed as 403 with
error.type: RegionError(not a standard OpenAI-style error code)
Expected
- Either an API opt-in mechanism (e.g. header/body flag, workspace setting changeable via API), or
- Model excluded from
/modelsfor regions without opt-in, or - Error body documenting how to opt in programmatically
Environment
- Endpoint: https://opencode.ai/zen/go/v1 (Console Go)
- Auth:
sk-...Bearer key - All other listed models work on same key (tested 2026-07-31): kimi-k3, glm-5.2, qwen3.7-plus, deepseek-v4-pro, gpt-5.6-luna, grok-4.5, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.