Просмотр исходного кода

Fix Bedrock Claude Sonnet 4.6 model ID, cc #11509 (#11569)

Replace the incorrect Sonnet 4.6 Bedrock ID with the AWS-supported
model ID in the model registry and Bedrock capability lists.

Remove references to the deprecated dated ID and update Bedrock
tests to validate the corrected Sonnet 4.6 identifier.
Peter Dave Hello 9 часов назад
Родитель
Сommit
7bc966ee00

+ 3 - 3
packages/types/src/providers/bedrock.ts

@@ -27,7 +27,7 @@ export const bedrockModels = {
 		maxCachePoints: 4,
 		cachableFields: ["system", "messages", "tools"],
 	},
-	"anthropic.claude-sonnet-4-6-20260114-v1:0": {
+	"anthropic.claude-sonnet-4-6": {
 		maxTokens: 8192,
 		contextWindow: 200_000, // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
 		supportsImages: true,
@@ -523,7 +523,7 @@ export const BEDROCK_REGIONS = [
 export const BEDROCK_1M_CONTEXT_MODEL_IDS = [
 	"anthropic.claude-sonnet-4-20250514-v1:0",
 	"anthropic.claude-sonnet-4-5-20250929-v1:0",
-	"anthropic.claude-sonnet-4-6-20260114-v1:0",
+	"anthropic.claude-sonnet-4-6",
 	"anthropic.claude-opus-4-6-v1",
 ] as const
 
@@ -538,7 +538,7 @@ export const BEDROCK_1M_CONTEXT_MODEL_IDS = [
 export const BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
 	"anthropic.claude-sonnet-4-20250514-v1:0",
 	"anthropic.claude-sonnet-4-5-20250929-v1:0",
-	"anthropic.claude-sonnet-4-6-20260114-v1:0",
+	"anthropic.claude-sonnet-4-6",
 	"anthropic.claude-haiku-4-5-20251001-v1:0",
 	"anthropic.claude-opus-4-5-20251101-v1:0",
 	"anthropic.claude-opus-4-6-v1",

+ 1 - 1
src/api/providers/__tests__/bedrock.spec.ts

@@ -703,7 +703,7 @@ describe("AwsBedrockHandler", () => {
 
 		it("should apply 1M tier pricing when awsBedrock1MContext is true for Claude Sonnet 4.6", () => {
 			const handler = new AwsBedrockHandler({
-				apiModelId: "anthropic.claude-sonnet-4-6-20260114-v1:0",
+				apiModelId: "anthropic.claude-sonnet-4-6",
 				awsAccessKey: "test",
 				awsSecretKey: "test",
 				awsRegion: "us-east-1",