zed-industries/zed · error

Unsupported Region {region}

Error message

Unsupported Region {region}

What it means

Zed's Bedrock integration maps AWS regions to cross-region inference-profile groups (us-gov, us/sa, ca, eu, au, jp, apac, global). Region strings outside those prefixes - e.g. af-south-1, il-central-1, or a mistyped region used with a built-in model - fall through to this bail when resolving the inference profile id.

Source

Thrown at crates/bedrock/src/models.rs:735

                "global"
            } else {
                "au"
            }
        } else if region == "ap-northeast-1" || region == "ap-northeast-3" {
            // Japan
            if allow_global && supports_global {
                "global"
            } else {
                "jp"
            }
        } else if region.starts_with("ap-") || region.starts_with("me-") {
            if allow_global && supports_global {
                "global"
            } else {
                "apac"
            }
        } else {
            anyhow::bail!("Unsupported Region {region}");
        };

        match (self, region_group) {
            (Self::Custom { .. }, _) => Ok(model_id.into()),

            // Global inference profiles
            (
                Self::ClaudeFable5
                | Self::ClaudeOpus5
                | Self::ClaudeOpus4_8
                | Self::ClaudeOpus4_7
                | Self::ClaudeOpus4_6
                | Self::ClaudeOpus4_5
                | Self::ClaudeSonnet5
                | Self::ClaudeSonnet4_6
                | Self::ClaudeSonnet4_5
                | Self::ClaudeSonnet4
                | Self::ClaudeHaiku4_5

View on GitHub (pinned to bc538def45)

Solutions

  1. Switch to a supported region (e.g. us-east-1, eu-central-1, ap-northeast-1).
  2. If you must use an unmapped region, configure the model as a Custom entry with an explicit model/inference-profile id - Custom entries bypass region grouping.
  3. Update Zed - region mappings are extended as AWS adds regions.
  4. Check for typos in the region setting (lowercase, hyphens, e.g. 'ap-southeast-1').

Example fix

// before
{ "region": "af-south-1" }

// after
{ "region": "eu-central-1" }
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED_PREFIXES: [&str; 7] = ["us-gov-", "us-", "sa-", "ca-", "eu-", "ap-", "me-"];
if !SUPPORTED_PREFIXES.iter().any(|prefix| region.starts_with(prefix)) {
    return Err(anyhow::anyhow!("Unsupported Region {region}"));
}

Type guard

fn is_supported_bedrock_region(region: &str) -> bool {
    ["us-gov-", "us-", "sa-", "ca-", "eu-", "ap-", "me-"]
        .iter()
        .any(|prefix| region.starts_with(prefix))
}

Try / catch

match model-resolution errors containing "Unsupported Region"; either rewrite the region to the nearest supported one or fall back to a Custom model entry with an explicit inference-profile id.

Prevention

When it happens

Trigger: Resolving a built-in model id with a region that does not start with us-, us-gov-, sa-, ca-, eu-, ap-, or me- (e.g. af-south-1, il-central-1, or typos like 'us_east_1'). Custom { .. } model entries skip region grouping entirely.

Common situations: AWS adds a region not yet covered by the mapping; typos in the region setting; pointing Zed at a nonstandard Bedrock endpoint with a made-up region while using a built-in model.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/c3cc1ee12f0d1f29. Report an issue: GitHub.