Skip to content

Commit 41dfca2

Browse files
committed
This test is failing on Windows
1 parent c4c8870 commit 41dfca2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// npx jest src/api/providers/__tests__/requesty.test.ts
2+
13
import { Anthropic } from "@anthropic-ai/sdk"
24
import OpenAI from "openai"
35
import { ApiHandlerOptions, ModelInfo } from "../../../shared/api"
@@ -9,6 +11,22 @@ import { convertToR1Format } from "../../transform/r1-format"
911
jest.mock("openai")
1012
jest.mock("../../transform/openai-format")
1113
jest.mock("../../transform/r1-format")
14+
jest.mock("../fetchers/cache", () => ({
15+
getModels: jest.fn().mockResolvedValue({
16+
"test-model": {
17+
maxTokens: 8192,
18+
contextWindow: 200_000,
19+
supportsImages: true,
20+
supportsComputerUse: true,
21+
supportsPromptCache: true,
22+
inputPrice: 3.0,
23+
outputPrice: 15.0,
24+
cacheWritesPrice: 3.75,
25+
cacheReadsPrice: 0.3,
26+
description: "Test model description",
27+
},
28+
}),
29+
}))
1230

1331
describe("RequestyHandler", () => {
1432
let handler: RequestyHandler

0 commit comments

Comments
 (0)