File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/api/providers/__tests__ Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ // npx jest src/api/providers/__tests__/requesty.test.ts
2+
13import { Anthropic } from "@anthropic-ai/sdk"
24import OpenAI from "openai"
35import { ApiHandlerOptions , ModelInfo } from "../../../shared/api"
@@ -9,6 +11,22 @@ import { convertToR1Format } from "../../transform/r1-format"
911jest . mock ( "openai" )
1012jest . mock ( "../../transform/openai-format" )
1113jest . 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
1331describe ( "RequestyHandler" , ( ) => {
1432 let handler : RequestyHandler
You can’t perform that action at this time.
0 commit comments