From 18f15559e3055d8e44aee85bee476bc2b8c791a9 Mon Sep 17 00:00:00 2001 From: Pugazhendhi Date: Thu, 6 Feb 2025 13:03:03 +0530 Subject: [PATCH] Fixes test file --- src/api/providers/__tests__/unbound.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/api/providers/__tests__/unbound.test.ts b/src/api/providers/__tests__/unbound.test.ts index 3a0fe4868e..e273c7d3e8 100644 --- a/src/api/providers/__tests__/unbound.test.ts +++ b/src/api/providers/__tests__/unbound.test.ts @@ -73,6 +73,15 @@ describe("UnboundHandler", () => { mockOptions = { apiModelId: "anthropic/claude-3-5-sonnet-20241022", unboundApiKey: "test-api-key", + unboundModelId: "anthropic/claude-3-5-sonnet-20241022", + unboundModelInfo: { + description: "Anthropic's Claude 3 Sonnet model", + maxTokens: 8192, + contextWindow: 200000, + supportsPromptCache: true, + inputPrice: 0.01, + outputPrice: 0.02, + }, } handler = new UnboundHandler(mockOptions) mockCreate.mockClear() @@ -230,7 +239,8 @@ describe("UnboundHandler", () => { it("should return default model when invalid model provided", () => { const handlerWithInvalidModel = new UnboundHandler({ ...mockOptions, - apiModelId: "invalid/model", + unboundModelId: "invalid/model", + unboundModelInfo: undefined, }) const modelInfo = handlerWithInvalidModel.getModel() expect(modelInfo.id).toBe("openai/gpt-4o") // Default model