mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
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
This commit is contained in:
parent
bb6cac4980
commit
9f4684cd39
2 changed files with 3 additions and 46 deletions
|
|
@ -205,33 +205,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,
|
||||
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,
|
||||
inputPrice: 8.0,
|
||||
outputPrice: 24.0,
|
||||
description: "Claude 2.0",
|
||||
},
|
||||
"anthropic.claude-instant-v1:0": {
|
||||
maxTokens: 4096,
|
||||
contextWindow: 100_000,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0.8,
|
||||
outputPrice: 2.4,
|
||||
description: "Claude Instant",
|
||||
},
|
||||
"deepseek.r1-v1:0": {
|
||||
maxTokens: 32_768,
|
||||
contextWindow: 128_000,
|
||||
|
|
@ -373,22 +346,6 @@ export const bedrockModels = {
|
|||
outputPrice: 0.6,
|
||||
description: "Amazon Titan Text Express",
|
||||
},
|
||||
"amazon.titan-text-embeddings-v1:0": {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 8_000,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0.1,
|
||||
description: "Amazon Titan Text Embeddings",
|
||||
},
|
||||
"amazon.titan-text-embeddings-v2:0": {
|
||||
maxTokens: 8192,
|
||||
contextWindow: 8_000,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0.02,
|
||||
description: "Amazon Titan Text Embeddings V2",
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
||||
export const BEDROCK_DEFAULT_TEMPERATURE = 0.3
|
||||
|
|
|
|||
|
|
@ -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-sonnet-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-sonnet-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(3)
|
||||
|
||||
// Verify that a usage event was emitted after updating the costModelConfig
|
||||
const usageEvents = events.filter((event) => event.type === "usage")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue