@@ -66,7 +66,7 @@ describe("ChutesHandler", () => {
6666
6767 test ( "should return specified model when valid model is provided" , ( ) => {
6868 // Using an actual model ID from the Chutes API response
69- const testModelId : ChutesModelId = "Qwen/Qwen2.5-72B-Instruct "
69+ const testModelId : ChutesModelId = "deepseek-ai/DeepSeek-R1 "
7070 const handlerWithModel = new ChutesHandler ( { apiModelId : testModelId } ) // Instantiate ChutesHandler
7171 const model = handlerWithModel . getModel ( )
7272
@@ -95,7 +95,9 @@ describe("ChutesHandler", () => {
9595 const errorMessage = "Chutes API error"
9696 mockCreate . mockRejectedValueOnce ( new Error ( errorMessage ) )
9797
98- await expect ( handler . completePrompt ( "test prompt" ) ) . rejects . toThrow ( `Chutes AI completion error: ${ errorMessage } ` ) // Updated error message prefix
98+ await expect ( handler . completePrompt ( "test prompt" ) ) . rejects . toThrow (
99+ `Chutes AI completion error: ${ errorMessage } ` ,
100+ ) // Updated error message prefix
99101 } )
100102
101103 test ( "createMessage should yield text content from stream" , async ( ) => {
@@ -141,7 +143,8 @@ describe("ChutesHandler", () => {
141143 done : false ,
142144 value : {
143145 choices : [ { delta : { } } ] , // Needs to have choices array to avoid error
144- usage : { // Assuming standard OpenAI usage fields
146+ usage : {
147+ // Assuming standard OpenAI usage fields
145148 prompt_tokens : 10 ,
146149 completion_tokens : 20 ,
147150 } ,
@@ -158,7 +161,8 @@ describe("ChutesHandler", () => {
158161
159162 // Verify the usage data
160163 expect ( firstChunk . done ) . toBe ( false )
161- expect ( firstChunk . value ) . toEqual ( { // Updated expected usage structure
164+ expect ( firstChunk . value ) . toEqual ( {
165+ // Updated expected usage structure
162166 type : "usage" ,
163167 inputTokens : 10 ,
164168 outputTokens : 20 ,
@@ -204,4 +208,4 @@ describe("ChutesHandler", () => {
204208 } ) ,
205209 )
206210 } )
207- } )
211+ } )
0 commit comments