GeezerVison is showing github.com — gpt-5.6-luna 经 OpenCode Go 中继访问返回 403: "This model is not available in your region" · Issue #41518 · anomalyco/opencode
gpt-5.6-luna 经 OpenCode Go 中继访问返回 403: "This model is not available in your region" #41518DescriptionDescription
通过 opencode.ai 的 "OpenCode Go" 中继访问模型 gpt-5.6-luna 时,返回 403。
完整报错:
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."}}
同一 Key 请求 deepseek-v4-flash → 200 正常;kimi-k2.7-code 也正常。
所以模型名正确、Key 有效,问题在于上游按地区/账号拒绝了 gpt-5.6-luna。
想确认:gpt-5.6-luna 是否支持当前地区?如果不支持,能否开通?
Plugins
未安装第三方插件。配置里只有一个 glm-vision MCP server(本地)。
OpenCode version
1.18.16(opencode --version)
Steps to reproduce
No response
Screenshot and/or share link
- 在 Codex(或 OpenCode)中选择模型
gpt-5.6-luna(经 CC Switch 本地代理转发到 opencode.ai "OpenCode Go" 中继,base_url: https://opencode.ai/zen/go/v1)
- 发送任意请求
- 立即收到 403:
This model is not available in your region.
Operating System
Windows 11(Home China,build 26200)
Terminal
Windows Terminal 1.24.11911.0 Activitygithub-actions commented on Aug 10, 2026 This issue might be a duplicate of existing issues. Please check:
wulishuhan commented on 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:
- 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)?
cc @fwang SangYu666 commented on Aug 14, 2026 Reacted by tclxxiaofeng-wang, yayozen, kolanioo, dongmingre, HydrogenDelta, 7214978, xlu137492, Kane and peiyu imkawa commented on 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 commented on Aug 24, 2026 补充一组复现数据,可以进一步缩小范围(Windows 11,OpenCode Desktop,provider: opencode-go):
复现特征
1. 错误随时间变化
- 2026-08-22 全天:
Upstream request failed: [server_error] Upstream response was not valid JSON + Service Unavailable(约 17 次全部失败)
- 2026-08-24 起:变为
[unsupported_country_region_territory] Country, region, or territory not supported
2. 同一时刻"小请求成功、大请求失败"(关键发现)
2026-08-24 ~00:49 UTC,同一 key、同一出口 IP:
| 请求方式 |
结果 |
App 内旧会话(大上下文,ses_fd748f54affeLoVxYRt7qiDX4Q) |
❌ unsupported_country_region_territory |
直接 curl /zen/go/v1/responses 裸请求 "hi" |
✅ completed |
| 同上 + tools 定义 |
✅ completed |
| 同上 + ~40KB 输入 |
✅ completed |
同上 + "stream": true |
✅ HTTP 200 SSE 正常 |
同上 + "store": true |
✅ completed |
连续 6 次裸请求 100% 成功的同时,App 内请求持续失败。
推测
结合 #40180 的分析:网关不同节点对客户端地理头(cf-ipcountry 等)的处理不一致——
部分节点剥离了头所以成功,部分节点原样转发导致被上游 OpenAI 拒绝。
负载均衡落在哪个节点决定了成败,表现为"时好时坏"。
另外大上下文会话可能被路由到固定/特定节点池,导致旧会话必现失败而新请求随机成功。
环境
- OpenCode Desktop(@opencode-aidesktop),Windows 11
- provider: opencode-go,model: gpt-5.6-luna
- 同 key 下 glm-5.3 / deepseek-v4-pro / big-pickle 均正常
thdxr commented on 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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|