{"record":{"id":"c3cc1ee12f0d1f29","repo":"zed-industries/zed","slug":"unsupported-region-region","errorCode":null,"errorMessage":"Unsupported Region {region}","messagePattern":"Unsupported Region (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bedrock/src/models.rs","lineNumber":735,"sourceCode":"                \"global\"\n            } else {\n                \"au\"\n            }\n        } else if region == \"ap-northeast-1\" || region == \"ap-northeast-3\" {\n            // Japan\n            if allow_global && supports_global {\n                \"global\"\n            } else {\n                \"jp\"\n            }\n        } else if region.starts_with(\"ap-\") || region.starts_with(\"me-\") {\n            if allow_global && supports_global {\n                \"global\"\n            } else {\n                \"apac\"\n            }\n        } else {\n            anyhow::bail!(\"Unsupported Region {region}\");\n        };\n\n        match (self, region_group) {\n            (Self::Custom { .. }, _) => Ok(model_id.into()),\n\n            // Global inference profiles\n            (\n                Self::ClaudeFable5\n                | Self::ClaudeOpus5\n                | Self::ClaudeOpus4_8\n                | Self::ClaudeOpus4_7\n                | Self::ClaudeOpus4_6\n                | Self::ClaudeOpus4_5\n                | Self::ClaudeSonnet5\n                | Self::ClaudeSonnet4_6\n                | Self::ClaudeSonnet4_5\n                | Self::ClaudeSonnet4\n                | Self::ClaudeHaiku4_5","sourceCodeStart":717,"sourceCodeEnd":753,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/bedrock/src/models.rs#L717-L753","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Switch to a supported region (e.g. us-east-1, eu-central-1, ap-northeast-1).","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.","Update Zed - region mappings are extended as AWS adds regions.","Check for typos in the region setting (lowercase, hyphens, e.g. 'ap-southeast-1')."],"exampleFix":"// before\n{ \"region\": \"af-south-1\" }\n\n// after\n{ \"region\": \"eu-central-1\" }","handlingStrategy":"validation","validationCode":"const SUPPORTED_PREFIXES: [&str; 7] = [\"us-gov-\", \"us-\", \"sa-\", \"ca-\", \"eu-\", \"ap-\", \"me-\"];\nif !SUPPORTED_PREFIXES.iter().any(|prefix| region.starts_with(prefix)) {\n    return Err(anyhow::anyhow!(\"Unsupported Region {region}\"));\n}","typeGuard":"fn is_supported_bedrock_region(region: &str) -> bool {\n    [\"us-gov-\", \"us-\", \"sa-\", \"ca-\", \"eu-\", \"ap-\", \"me-\"]\n        .iter()\n        .any(|prefix| region.starts_with(prefix))\n}","tryCatchPattern":"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.","preventionTips":["Validate the region string at settings-load time","Prefer mainstream regions for inference profiles","Use Custom model entries for new or unmapped regions","Update Zed when AWS launches new regions"],"tags":["aws","bedrock","region","configuration"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}