Skip to content

Commit 9f4684c

Browse files
committed
fix: remove legacy Claude 2 series and embedding models from Bedrock provider
- Removed anthropic.claude-2-1-v1:0, anthropic.claude-2-0-v1:0, and anthropic.claude-instant-v1:0 - Removed amazon.titan-text-embeddings-v1:0 and amazon.titan-text-embeddings-v2:0 - Updated test to use Claude 3 Sonnet instead of removed Claude 2.1 model Fixes #9220
1 parent bb6cac4 commit 9f4684c

File tree

2 files changed

+3
-46
lines changed

2 files changed

+3
-46
lines changed

packages/types/src/providers/bedrock.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -205,33 +205,6 @@ export const bedrockModels = {
205205
inputPrice: 0.25,
206206
outputPrice: 1.25,
207207
},
208-
"anthropic.claude-2-1-v1:0": {
209-
maxTokens: 4096,
210-
contextWindow: 100_000,
211-
supportsImages: false,
212-
supportsPromptCache: false,
213-
inputPrice: 8.0,
214-
outputPrice: 24.0,
215-
description: "Claude 2.1",
216-
},
217-
"anthropic.claude-2-0-v1:0": {
218-
maxTokens: 4096,
219-
contextWindow: 100_000,
220-
supportsImages: false,
221-
supportsPromptCache: false,
222-
inputPrice: 8.0,
223-
outputPrice: 24.0,
224-
description: "Claude 2.0",
225-
},
226-
"anthropic.claude-instant-v1:0": {
227-
maxTokens: 4096,
228-
contextWindow: 100_000,
229-
supportsImages: false,
230-
supportsPromptCache: false,
231-
inputPrice: 0.8,
232-
outputPrice: 2.4,
233-
description: "Claude Instant",
234-
},
235208
"deepseek.r1-v1:0": {
236209
maxTokens: 32_768,
237210
contextWindow: 128_000,
@@ -373,22 +346,6 @@ export const bedrockModels = {
373346
outputPrice: 0.6,
374347
description: "Amazon Titan Text Express",
375348
},
376-
"amazon.titan-text-embeddings-v1:0": {
377-
maxTokens: 8192,
378-
contextWindow: 8_000,
379-
supportsImages: false,
380-
supportsPromptCache: false,
381-
inputPrice: 0.1,
382-
description: "Amazon Titan Text Embeddings",
383-
},
384-
"amazon.titan-text-embeddings-v2:0": {
385-
maxTokens: 8192,
386-
contextWindow: 8_000,
387-
supportsImages: false,
388-
supportsPromptCache: false,
389-
inputPrice: 0.02,
390-
description: "Amazon Titan Text Embeddings V2",
391-
},
392349
} as const satisfies Record<string, ModelInfo>
393350

394351
export const BEDROCK_DEFAULT_TEMPERATURE = 0.3

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe("AwsBedrockHandler with invokedModelId", () => {
122122
trace: {
123123
promptRouter: {
124124
invokedModelId:
125-
"arn:aws:bedrock:us-west-2:699475926481:inference-profile/us.anthropic.claude-2-1-v1:0",
125+
"arn:aws:bedrock:us-west-2:699475926481:inference-profile/us.anthropic.claude-3-sonnet-20240229-v1:0",
126126
usage: {
127127
inputTokens: 150,
128128
outputTokens: 250,
@@ -162,12 +162,12 @@ describe("AwsBedrockHandler with invokedModelId", () => {
162162
}
163163

164164
// Verify that getModelById was called with the id, not the full arn
165-
expect(getModelByIdSpy).toHaveBeenCalledWith("anthropic.claude-2-1-v1:0", "inference-profile")
165+
expect(getModelByIdSpy).toHaveBeenCalledWith("anthropic.claude-3-sonnet-20240229-v1:0", "inference-profile")
166166

167167
// Verify that getModel returns the updated model info
168168
const costModel = handler.getModel()
169169
//expect(costModel.id).toBe("anthropic.claude-3-5-sonnet-20240620-v1:0")
170-
expect(costModel.info.inputPrice).toBe(8)
170+
expect(costModel.info.inputPrice).toBe(3)
171171

172172
// Verify that a usage event was emitted after updating the costModelConfig
173173
const usageEvents = events.filter((event) => event.type === "usage")

0 commit comments

Comments
 (0)