opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[bug] Country, region, or territory not supported error

Open justcarlson opened this issue 1 day ago • 11 comments

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

  1. Start a session in Opencode.
  2. Run an explore task (e.g., "Explore templater config") that triggers tool calls.
  3. 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

Screenshot

Image

justcarlson avatar Jan 16 '26 03:01 justcarlson