@@ -375,12 +375,41 @@ describe("shouldUseReasoningEffort", () => {
375375 reasoningEffort : "medium" ,
376376 }
377377
378- // Should return true regardless of settings
378+ // Should return true regardless of settings (unless explicitly disabled)
379379 expect ( shouldUseReasoningEffort ( { model } ) ) . toBe ( true )
380380 expect ( shouldUseReasoningEffort ( { model, settings : { } } ) ) . toBe ( true )
381381 expect ( shouldUseReasoningEffort ( { model, settings : { reasoningEffort : undefined } } ) ) . toBe ( true )
382382 } )
383383
384+ test ( "should return false when enableReasoningEffort is false, even if reasoningEffort is set" , ( ) => {
385+ const model : ModelInfo = {
386+ contextWindow : 200_000 ,
387+ supportsPromptCache : true ,
388+ supportsReasoningEffort : true ,
389+ }
390+
391+ const settings : ProviderSettings = {
392+ enableReasoningEffort : false ,
393+ reasoningEffort : "medium" ,
394+ }
395+
396+ expect ( shouldUseReasoningEffort ( { model, settings } ) ) . toBe ( false )
397+ } )
398+
399+ test ( "should return false when enableReasoningEffort is false, even if model has reasoningEffort property" , ( ) => {
400+ const model : ModelInfo = {
401+ contextWindow : 200_000 ,
402+ supportsPromptCache : true ,
403+ reasoningEffort : "medium" ,
404+ }
405+
406+ const settings : ProviderSettings = {
407+ enableReasoningEffort : false ,
408+ }
409+
410+ expect ( shouldUseReasoningEffort ( { model, settings } ) ) . toBe ( false )
411+ } )
412+
384413 test ( "should return true when model supports reasoning effort and settings provide reasoning effort" , ( ) => {
385414 const model : ModelInfo = {
386415 contextWindow : 200_000 ,
0 commit comments