opencode
opencode copied to clipboard
[bug] Country, region, or territory not supported error
Summary
Opencode session fails with Country, region, or territory not supported while running an explore task, resulting in a streamed AI_APICallError.
Version
opencode v1.1.19
Steps to Reproduce
- Start a session in Opencode.
- Run an explore task (e.g., "Explore templater config") that triggers tool calls.
- Observe the stream error.
Expected
The task runs or returns a recoverable error without blocking the session.
Actual
Session stream errors with a 403 and unsupported_country_region_territory.
Logs (truncated)
INFO 2026-01-16T02:57:39 service=llm providerID=opencode modelID=gpt-5.2-codex sessionID=ses_43b8c320bffeOAdNNVlKAbWmBa agent=plan stream
ERROR 2026-01-16T02:57:40 service=llm error={
"name":"AI_APICallError",
"url":"https://opencode.ai/zen/v1/responses",
"requestBodyValues":{"model":"gpt-5.2-codex","stream":true},
"statusCode":403,
"responseBody":"{\"error\":{\"code\":\"unsupported_country_region_territory\",\"message\":\"Country, region, or territory not supported\"}}",
"data":{"error":{"message":"Country, region, or territory not supported","type":"request_forbidden","code":"unsupported_country_region_territory"}}
} stream error