Skip to content

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

@justcarlson

Description

@justcarlson

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

Metadata

Metadata

Assignees

Labels

zenRelates to Zen

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions