opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(provider): add jp. prefix auto-assignment for Tokyo region (ap-northeast-1)

Open ikeda-tomoya-swx opened this issue 1 week ago • 1 comments

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 isTokyoRegion check in the case "ap" block
  • Tokyo region (ap-northeast-1) → uses jp. 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.

ikeda-tomoya-swx avatar Jan 06 '26 06:01 ikeda-tomoya-swx