@@ -101,6 +101,7 @@ vitest.mock("../../providers/fetchers/modelCache", () => ({
101101 supportsPromptCache : true ,
102102 inputPrice : 0 ,
103103 outputPrice : 0 ,
104+ defaultToolProtocol : "native" ,
104105 } ,
105106 "minimax/minimax-m2:free" : {
106107 maxTokens : 32_768 ,
@@ -110,6 +111,7 @@ vitest.mock("../../providers/fetchers/modelCache", () => ({
110111 supportsNativeTools : true ,
111112 inputPrice : 0.15 ,
112113 outputPrice : 0.6 ,
114+ defaultToolProtocol : "native" ,
113115 } ,
114116 "anthropic/claude-haiku-4.5" : {
115117 maxTokens : 8_192 ,
@@ -119,6 +121,7 @@ vitest.mock("../../providers/fetchers/modelCache", () => ({
119121 supportsNativeTools : true ,
120122 inputPrice : 0.8 ,
121123 outputPrice : 4 ,
124+ defaultToolProtocol : "native" ,
122125 } ,
123126 }
124127 }
@@ -425,28 +428,15 @@ describe("RooHandler", () => {
425428 }
426429 } )
427430
428- it ( "should apply defaultToolProtocol: native for minimax/minimax-m2:free" , ( ) => {
429- const handlerWithMinimax = new RooHandler ( {
430- apiModelId : "minimax/minimax-m2:free" ,
431- } )
432- const modelInfo = handlerWithMinimax . getModel ( )
433- expect ( modelInfo . id ) . toBe ( "minimax/minimax-m2:free" )
434- expect ( ( modelInfo . info as any ) . defaultToolProtocol ) . toBe ( "native" )
435- // Verify cached model info is preserved
436- expect ( modelInfo . info . maxTokens ) . toBe ( 32_768 )
437- expect ( modelInfo . info . contextWindow ) . toBe ( 1_000_000 )
438- } )
439-
440- it ( "should apply defaultToolProtocol: native for anthropic/claude-haiku-4.5" , ( ) => {
441- const handlerWithHaiku = new RooHandler ( {
442- apiModelId : "anthropic/claude-haiku-4.5" ,
443- } )
444- const modelInfo = handlerWithHaiku . getModel ( )
445- expect ( modelInfo . id ) . toBe ( "anthropic/claude-haiku-4.5" )
446- expect ( ( modelInfo . info as any ) . defaultToolProtocol ) . toBe ( "native" )
447- // Verify cached model info is preserved
448- expect ( modelInfo . info . maxTokens ) . toBe ( 8_192 )
449- expect ( modelInfo . info . contextWindow ) . toBe ( 200_000 )
431+ it ( "should have defaultToolProtocol: native for all roo provider models" , ( ) => {
432+ // Test that all models have defaultToolProtocol: native
433+ const testModels = [ "minimax/minimax-m2:free" , "anthropic/claude-haiku-4.5" , "xai/grok-code-fast-1" ]
434+ for ( const modelId of testModels ) {
435+ const handlerWithModel = new RooHandler ( { apiModelId : modelId } )
436+ const modelInfo = handlerWithModel . getModel ( )
437+ expect ( modelInfo . id ) . toBe ( modelId )
438+ expect ( ( modelInfo . info as any ) . defaultToolProtocol ) . toBe ( "native" )
439+ }
450440 } )
451441
452442 it ( "should not override existing properties when applying MODEL_DEFAULTS" , ( ) => {
0 commit comments