You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpt-5.6-luna 经 OpenCode Go 中继访问返回 403: "This model is not available in your region" #41518
CC Switch local proxy failed while handling Codex endpoint /responses.
Provider: OpenCode Go; model: gpt-5.6-luna; upstream_status: HTTP 403;
cause: 上游错误 (403):, url: http://127.0.0.1:15721/v1/responses
用有效 Key 直接请求上游验证:
GET https://opencode.ai/zen/go/v1/models → 200,列表里确实有gpt-5.6-luna
POST https://opencode.ai/zen/go/v1/responses(model: gpt-5.6-luna, input: "hi")→ 403,
响应体为: {"model":"gpt-5.6-luna","error":{"message":"Error from provider (Console Go): Upstream request failed: [403] This model is not available in your region."}}
The API key is valid: same key returns HTTP 200 for deepseek-v4-flash and kimi-k2.7-code, and the provider connection test succeeds (25 models discoverable, including gpt-5.6-luna).
The egress region is NOT the problem: I tested the actual proxy egress used by the relay calls via https://opencode.ai/cdn-cgi/trace and it reports loc=SG (Singapore, 18.143.67.40). I also previously hit the same 403 while the connection exited via a US node (cf-ray ...-EWR). Both Singapore and US are OpenAI-supported regions, yet gpt-5.6-luna still returns:
Error from provider (Console Go): Upstream request failed: [403] This model is not available in your region.
The account was registered from mainland China.
Questions:
Is the region check based on the account's registered country rather than the request egress IP?
If so, can GPT models be enabled for accounts registered in mainland China, or is this out of scope for the Go plan?
The Go plan page advertises gpt-5.6-luna as included — if mainland-China accounts cannot use it, what is the remedy (enablement or refund)?
@fwang
Mainland China-registered account cannot use gpt-5.6-luna — request confirmation of region restriction basis and remedy
I'm experiencing the same issue, and I'd like to share my verified findings for the maintainers' reference.
Environment
Account region: Mainland China
Plan: OpenCode Go subscription (gpt-5.6-luna is explicitly listed on the plan page)
Access method: via an OpenAI-compatible client connecting directly to https://opencode.ai/zen/go/v1
Verification results (with API key)
GET /v1/models → 200, gpt-5.6-luna is indeed present in the model list
Same key with deepseek-v4-pro and kimi-k3 → 200, works fine
POST /v1/responses (model: gpt-5.6-luna) → 403, returning: "Error from provider (Console Go): Upstream request failed: [403] This model is not available in your region."
Variables already ruled out
Egress IP is not the cause: my egress is China Telecom (mainland). Also, another user in this thread tested Singapore (SG) and US (EWR) nodes and still got 403.
This is unrelated to the "enable models deployed in China" opt-in toggle: that toggle affects the RegionError for deepseek-v4-flash; luna is subject to a different restriction.
Questions
Is the region check based on the account registration country, rather than the request egress IP?
If so, the Go plan advertises gpt-5.6-luna, yet accounts registered in Mainland China (equally paying customers, and presumably within the supported country list) cannot use it at all. Are there any remedies available, such as account migration, manual approval, or a refund?
Is there an official list of supported regions for this model? Are mainland China accounts planned to be supported in the future?
Thanks in advance for any official clarification.
Issue Description
When using OpenCode to call GPT-5.6-luna, intermittent failures occur:
Sometimes it responds normally;
Other times it returns the error: Upstream request failed: [403] This model is not available in your region.
Troubleshooting Process
Checked router rule matching: Found that OpenCode requests sometimes fail to match any proxy/routing rules, making it impossible to determine whether the traffic actually went through the proxy.
Checked network connection method: Discovered that OpenCode establishes connections using IPv4 + IPv6 dual-stack.
Identified the cause of rule failure: The proxy/routing rules on the router cannot match or hijack IPv6 traffic. This portion of traffic exits directly using the real IP (direct connection).
Root Cause Analysis
When OpenCode connects via IPv4, traffic is captured by router rules and forced through the proxy, so it can be accessed normally.
When OpenCode connects via IPv6, traffic bypasses proxy rules and exits via direct connection. The server detects that the real IP's region is restricted and returns a 403 region restriction error.
Solution
Disable IPv6 on the computer to force OpenCode to establish connections only via IPv4.
This ensures all traffic is handled by the router's proxy rules, and the 403 region-unavailable issue caused by IPv6 direct connection no longer occurs.
Summary
IPv6 traffic bypasses router proxy rules → Real IP is exposed → Triggers region restriction 403.
Disabling client IPv6 and forcing pure IPv4 connections unifies all traffic through the proxy, which completely resolves this issue.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Aug 10, 2026
This issue might be a duplicate of existing issues. Please check:
wulishuhan commentedon Aug 10, 2026
Same issue here, with additional evidence that may help isolate the cause.
Setup: Codex → opencodex local proxy → OpenCode Go relay (https://opencode.ai/zen/go/v1) → gpt-5.6-luna.
Findings:
Error from provider (Console Go): Upstream request failed: [403] This model is not available in your region.
Questions:
cc @fwang
q531620267 commentedon Aug 14, 2026
@fwang
Mainland China-registered account cannot use gpt-5.6-luna — request confirmation of region restriction basis and remedy
I'm experiencing the same issue, and I'd like to share my verified findings for the maintainers' reference.
Environment
Account region: Mainland China
Plan: OpenCode Go subscription (gpt-5.6-luna is explicitly listed on the plan page)
Access method: via an OpenAI-compatible client connecting directly to https://opencode.ai/zen/go/v1
Verification results (with API key)
GET /v1/models → 200, gpt-5.6-luna is indeed present in the model list
Same key with deepseek-v4-pro and kimi-k3 → 200, works fine
POST /v1/responses (model: gpt-5.6-luna) → 403, returning: "Error from provider (Console Go): Upstream request failed: [403] This model is not available in your region."
Variables already ruled out
Egress IP is not the cause: my egress is China Telecom (mainland). Also, another user in this thread tested Singapore (SG) and US (EWR) nodes and still got 403.
This is unrelated to the "enable models deployed in China" opt-in toggle: that toggle affects the RegionError for deepseek-v4-flash; luna is subject to a different restriction.
Questions
Is the region check based on the account registration country, rather than the request egress IP?
If so, the Go plan advertises gpt-5.6-luna, yet accounts registered in Mainland China (equally paying customers, and presumably within the supported country list) cannot use it at all. Are there any remedies available, such as account migration, manual approval, or a refund?
Is there an official list of supported regions for this model? Are mainland China accounts planned to be supported in the future?
Thanks in advance for any official clarification.
SangYu666 commentedon Aug 14, 2026
代理开TUN模式,亲测有用
q531620267 commentedon Aug 14, 2026
q531620267 commentedon Aug 14, 2026
imkawa commentedon Aug 18, 2026
Issue Description
When using OpenCode to call GPT-5.6-luna, intermittent failures occur:
Sometimes it responds normally;
Other times it returns the error: Upstream request failed: [403] This model is not available in your region.
Troubleshooting Process
Checked router rule matching: Found that OpenCode requests sometimes fail to match any proxy/routing rules, making it impossible to determine whether the traffic actually went through the proxy.
Checked network connection method: Discovered that OpenCode establishes connections using IPv4 + IPv6 dual-stack.
Identified the cause of rule failure: The proxy/routing rules on the router cannot match or hijack IPv6 traffic. This portion of traffic exits directly using the real IP (direct connection).
Root Cause Analysis
When OpenCode connects via IPv4, traffic is captured by router rules and forced through the proxy, so it can be accessed normally.
When OpenCode connects via IPv6, traffic bypasses proxy rules and exits via direct connection. The server detects that the real IP's region is restricted and returns a 403 region restriction error.
Solution
Disable IPv6 on the computer to force OpenCode to establish connections only via IPv4.
This ensures all traffic is handled by the router's proxy rules, and the 403 region-unavailable issue caused by IPv6 direct connection no longer occurs.
Summary
IPv6 traffic bypasses router proxy rules → Real IP is exposed → Triggers region restriction 403.
Disabling client IPv6 and forcing pure IPv4 connections unifies all traffic through the proxy, which completely resolves this issue.
zhaozhiguoya commentedon Aug 24, 2026
补充一组复现数据,可以进一步缩小范围(Windows 11,OpenCode Desktop,provider: opencode-go):
复现特征
1. 错误随时间变化
Upstream request failed: [server_error] Upstream response was not valid JSON+Service Unavailable(约 17 次全部失败)[unsupported_country_region_territory] Country, region, or territory not supported2. 同一时刻"小请求成功、大请求失败"(关键发现)
2026-08-24 ~00:49 UTC,同一 key、同一出口 IP:
ses_fd748f54affeLoVxYRt7qiDX4Q)/zen/go/v1/responses裸请求 "hi""stream": true"store": true连续 6 次裸请求 100% 成功的同时,App 内请求持续失败。
推测
结合 #40180 的分析:网关不同节点对客户端地理头(
cf-ipcountry等)的处理不一致——部分节点剥离了头所以成功,部分节点原样转发导致被上游 OpenAI 拒绝。
负载均衡落在哪个节点决定了成败,表现为"时好时坏"。
另外大上下文会话可能被路由到固定/特定节点池,导致旧会话必现失败而新请求随机成功。
环境
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊