@@ -210,6 +210,7 @@ describe("RequestyHandler", () => {
210210 stream_options : { include_usage : true } ,
211211 temperature : 0 ,
212212 } ) ,
213+ expect . objectContaining ( { signal : expect . any ( AbortSignal ) } ) ,
213214 )
214215 } )
215216
@@ -243,6 +244,7 @@ describe("RequestyHandler", () => {
243244 thinking : { type : "adaptive" } ,
244245 temperature : undefined ,
245246 } ) ,
247+ expect . objectContaining ( { signal : expect . any ( AbortSignal ) } ) ,
246248 )
247249 } )
248250
@@ -314,6 +316,7 @@ describe("RequestyHandler", () => {
314316 ] ) ,
315317 tool_choice : "auto" ,
316318 } ) ,
319+ expect . objectContaining ( { signal : expect . any ( AbortSignal ) } ) ,
317320 )
318321 } )
319322
@@ -412,12 +415,15 @@ describe("RequestyHandler", () => {
412415
413416 expect ( result ) . toBe ( "test completion" )
414417
415- expect ( mockCreate ) . toHaveBeenCalledWith ( {
416- model : mockOptions . requestyModelId ,
417- max_tokens : 8192 ,
418- messages : [ { role : "system" , content : "test prompt" } ] ,
419- temperature : 0 ,
420- } )
418+ expect ( mockCreate ) . toHaveBeenCalledWith (
419+ {
420+ model : mockOptions . requestyModelId ,
421+ max_tokens : 8192 ,
422+ messages : [ { role : "system" , content : "test prompt" } ] ,
423+ temperature : 0 ,
424+ } ,
425+ expect . objectContaining ( { signal : expect . any ( AbortSignal ) } ) ,
426+ )
421427 } )
422428
423429 it ( "omits temperature for Claude Fable 5 in completePrompt" , async ( ) => {
@@ -429,12 +435,15 @@ describe("RequestyHandler", () => {
429435
430436 await handler . completePrompt ( "test prompt" )
431437
432- expect ( mockCreate ) . toHaveBeenCalledWith ( {
433- model : "anthropic/claude-fable-5" ,
434- max_tokens : 8192 ,
435- messages : [ { role : "system" , content : "test prompt" } ] ,
436- temperature : undefined ,
437- } )
438+ expect ( mockCreate ) . toHaveBeenCalledWith (
439+ {
440+ model : "anthropic/claude-fable-5" ,
441+ max_tokens : 8192 ,
442+ messages : [ { role : "system" , content : "test prompt" } ] ,
443+ temperature : undefined ,
444+ } ,
445+ expect . objectContaining ( { signal : expect . any ( AbortSignal ) } ) ,
446+ )
438447 } )
439448
440449 it ( "handles API errors" , async ( ) => {
0 commit comments