opencode
opencode copied to clipboard
fix(provider): add jp. prefix auto-assignment for Tokyo region (ap-northeast-1)
Summary
Add automatic jp. prefix assignment for Amazon Bedrock cross-region inference when using Tokyo region (ap-northeast-1).
Currently, the APAC region case uses apac. prefix for all AP regions, but Tokyo region requires jp. prefix for cross-region inference profiles.
Changes
- Add
isTokyoRegioncheck in thecase "ap"block - Tokyo region (
ap-northeast-1) → usesjp.prefix - Other APAC regions → continue using
apac.prefix
Test
Tested with GitHub Actions workflow using:
- Model:
amazon-bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0(without prefix) - Region:
ap-northeast-1 - Result: Successfully called Bedrock API with auto-prefixed
jp.anthropic.claude-sonnet-4-5-20250929-v1:0
Related
This complements the existing cross-region prefix skip logic (merged in #6916) by providing automatic prefix assignment for Tokyo region users.