From d9a90456e5e4f5037e03aa6882bbc6e7ac3ad8e3 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Wed, 7 Jan 2026 00:06:51 +0000 Subject: [PATCH] fix: remove legacy Claude 2 series models from Bedrock provider - Removed anthropic.claude-2-1-v1:0 (Claude 2.1) - Removed anthropic.claude-2-0-v1:0 (Claude 2.0) - Removed anthropic.claude-instant-v1:0 (Claude Instant) - Updated test to use Claude 3 Opus model instead of removed Claude 2.1 Fixes #9220 --- packages/types/src/providers/bedrock.ts | 33 ------------------- .../__tests__/bedrock-invokedModelId.spec.ts | 6 ++-- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/packages/types/src/providers/bedrock.ts b/packages/types/src/providers/bedrock.ts index da40e98f433..19dfbf0b306 100644 --- a/packages/types/src/providers/bedrock.ts +++ b/packages/types/src/providers/bedrock.ts @@ -264,39 +264,6 @@ export const bedrockModels = { inputPrice: 0.25, outputPrice: 1.25, }, - "anthropic.claude-2-1-v1:0": { - maxTokens: 4096, - contextWindow: 100_000, - supportsImages: false, - supportsPromptCache: false, - supportsNativeTools: true, - defaultToolProtocol: "native", - inputPrice: 8.0, - outputPrice: 24.0, - description: "Claude 2.1", - }, - "anthropic.claude-2-0-v1:0": { - maxTokens: 4096, - contextWindow: 100_000, - supportsImages: false, - supportsPromptCache: false, - supportsNativeTools: true, - defaultToolProtocol: "native", - inputPrice: 8.0, - outputPrice: 24.0, - description: "Claude 2.0", - }, - "anthropic.claude-instant-v1:0": { - maxTokens: 4096, - contextWindow: 100_000, - supportsImages: false, - supportsPromptCache: false, - supportsNativeTools: true, - defaultToolProtocol: "native", - inputPrice: 0.8, - outputPrice: 2.4, - description: "Claude Instant", - }, "deepseek.r1-v1:0": { maxTokens: 32_768, contextWindow: 128_000, diff --git a/src/api/providers/__tests__/bedrock-invokedModelId.spec.ts b/src/api/providers/__tests__/bedrock-invokedModelId.spec.ts index 7fe7255f5bc..fe16ea89eb6 100644 --- a/src/api/providers/__tests__/bedrock-invokedModelId.spec.ts +++ b/src/api/providers/__tests__/bedrock-invokedModelId.spec.ts @@ -122,7 +122,7 @@ describe("AwsBedrockHandler with invokedModelId", () => { trace: { promptRouter: { invokedModelId: - "arn:aws:bedrock:us-west-2:699475926481:inference-profile/us.anthropic.claude-2-1-v1:0", + "arn:aws:bedrock:us-west-2:699475926481:inference-profile/us.anthropic.claude-3-opus-20240229-v1:0", usage: { inputTokens: 150, outputTokens: 250, @@ -162,12 +162,12 @@ describe("AwsBedrockHandler with invokedModelId", () => { } // Verify that getModelById was called with the id, not the full arn - expect(getModelByIdSpy).toHaveBeenCalledWith("anthropic.claude-2-1-v1:0", "inference-profile") + expect(getModelByIdSpy).toHaveBeenCalledWith("anthropic.claude-3-opus-20240229-v1:0", "inference-profile") // Verify that getModel returns the updated model info const costModel = handler.getModel() //expect(costModel.id).toBe("anthropic.claude-3-5-sonnet-20240620-v1:0") - expect(costModel.info.inputPrice).toBe(8) + expect(costModel.info.inputPrice).toBe(15) // Verify that a usage event was emitted after updating the costModelConfig const usageEvents = events.filter((event) => event.type === "usage")