File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/api/providers/__tests__ Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments