Skip to content

Commit 18f1555

Browse files
committed
Fixes test file
1 parent 2863863 commit 18f1555

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/api/providers/__tests__/unbound.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ describe("UnboundHandler", () => {
7373
mockOptions = {
7474
apiModelId: "anthropic/claude-3-5-sonnet-20241022",
7575
unboundApiKey: "test-api-key",
76+
unboundModelId: "anthropic/claude-3-5-sonnet-20241022",
77+
unboundModelInfo: {
78+
description: "Anthropic's Claude 3 Sonnet model",
79+
maxTokens: 8192,
80+
contextWindow: 200000,
81+
supportsPromptCache: true,
82+
inputPrice: 0.01,
83+
outputPrice: 0.02,
84+
},
7685
}
7786
handler = new UnboundHandler(mockOptions)
7887
mockCreate.mockClear()
@@ -230,7 +239,8 @@ describe("UnboundHandler", () => {
230239
it("should return default model when invalid model provided", () => {
231240
const handlerWithInvalidModel = new UnboundHandler({
232241
...mockOptions,
233-
apiModelId: "invalid/model",
242+
unboundModelId: "invalid/model",
243+
unboundModelInfo: undefined,
234244
})
235245
const modelInfo = handlerWithInvalidModel.getModel()
236246
expect(modelInfo.id).toBe("openai/gpt-4o") // Default model

0 commit comments

Comments
 (0)