fix: Update bedrock test mock to match new getModel signature

This commit is contained in:
Roo Code 2025-11-13 23:45:05 +00:00
parent c133994163
commit f12ec26b8b

View file

@ -317,9 +317,10 @@ describe("AwsBedrockHandler with invokedModelId", () => {
}
})
// Mock getModel to throw an error when called with the model name
vitest.spyOn(handler, "getModel").mockImplementation((modelName?: string) => {
if (modelName === "anthropic.claude-3-sonnet-20240229-v1:0") {
// Mock getModel to throw an error when called with context tokens
vitest.spyOn(handler, "getModel").mockImplementation((contextTokens?: number) => {
// Throw error on second call (when it tries to get the invoked model)
if (contextTokens !== undefined) {
throw new Error("Test error during model lookup")
}