feat(bedrock): Add APAC Support for Cross-Region Inference Profiles (#1913)

* adding apac

* Remove unreachable 'break' after return in case 'ap-'.

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* changeset

* adding testing

* revert

* revart default model

* revert package-lock

* Remove unnecessary test

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
This commit is contained in:
watany 2025-03-02 09:39:10 +09:00 committed by GitHub
parent d44fd44a81
commit fcf6734949
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Add APAC Support for Cross-Region Inference Profiles

View file

@ -131,7 +131,7 @@ export class AwsBedrockHandler implements ApiHandler {
})
}
private async getModelId(): Promise<string> {
async getModelId(): Promise<string> {
if (this.options.awsUseCrossRegionInference) {
let regionPrefix = (this.options.awsRegion || "").slice(0, 3)
switch (regionPrefix) {
@ -139,6 +139,8 @@ export class AwsBedrockHandler implements ApiHandler {
return `us.${this.getModel().id}`
case "eu-":
return `eu.${this.getModel().id}`
case "ap-":
return `apac.${this.getModel().id}`
default:
// cross region inference is not supported in this region, falling back to default model
return this.getModel().id