Skip to content

Commit 598ccac

Browse files
committed
fix(bedrock): add ap-southeast-4 (Melbourne) to au. regional inference profile
1 parent 7cb080a commit 598ccac

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/types/src/providers/bedrock.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ export const BEDROCK_DEFAULT_CONTEXT = 128_000
401401
// https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html
402402
// This mapping is pre-ordered by pattern length (descending) to ensure more specific patterns match first
403403
export const AWS_INFERENCE_PROFILE_MAPPING: Array<[string, string]> = [
404-
// Australia region (Sydney) → au. inference profile (most specific - 14 chars)
404+
// Australia regions (Sydney and Melbourne) → au. inference profile (most specific - 14 chars)
405405
["ap-southeast-2", "au."],
406+
["ap-southeast-4", "au."],
406407
// Japan regions (Tokyo and Osaka) → jp. inference profile (13 chars)
407408
["ap-northeast-", "jp."],
408409
// US Government Cloud → ug. inference profile (7 chars)

src/api/providers/__tests__/bedrock-inference-profiles.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe("Amazon Bedrock Inference Profiles", () => {
3131
it("should contain all expected region mappings", () => {
3232
expect(AWS_INFERENCE_PROFILE_MAPPING).toEqual([
3333
["ap-southeast-2", "au."],
34+
["ap-southeast-4", "au."],
3435
["ap-northeast-", "jp."],
3536
["us-gov-", "ug."],
3637
["us-", "us."],
@@ -79,8 +80,9 @@ describe("Amazon Bedrock Inference Profiles", () => {
7980

8081
it("should return correct prefix for Asia Pacific regions", () => {
8182
const handler = createHandler()
82-
// Australia (Sydney) gets au. prefix
83+
// Australia regions (Sydney and Melbourne) get au. prefix
8384
expect((handler as any).constructor.getPrefixForRegion("ap-southeast-2")).toBe("au.")
85+
expect((handler as any).constructor.getPrefixForRegion("ap-southeast-4")).toBe("au.")
8486
// Japan regions (Tokyo and Osaka) get jp. prefix
8587
expect((handler as any).constructor.getPrefixForRegion("ap-northeast-1")).toBe("jp.")
8688
expect((handler as any).constructor.getPrefixForRegion("ap-northeast-3")).toBe("jp.")

src/api/providers/__tests__/bedrock.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ describe("AwsBedrockHandler", () => {
114114
it("should return correct prefix for APAC regions", () => {
115115
const getPrefixForRegion = (AwsBedrockHandler as any).getPrefixForRegion
116116

117-
// Australia (Sydney) gets au. prefix
117+
// Australia regions (Sydney and Melbourne) get au. prefix
118118
expect(getPrefixForRegion("ap-southeast-2")).toBe("au.")
119+
expect(getPrefixForRegion("ap-southeast-4")).toBe("au.")
119120
// Japan regions (Tokyo and Osaka) get jp. prefix
120121
expect(getPrefixForRegion("ap-northeast-1")).toBe("jp.")
121122
expect(getPrefixForRegion("ap-northeast-3")).toBe("jp.")

0 commit comments

Comments
 (0)