@@ -172,6 +172,39 @@ describe("ProviderTransform.options - zai/zhipuai thinking", () => {
172172 }
173173} )
174174
175+ describe ( "ProviderTransform.options - minimax m3 thinking" , ( ) => {
176+ const createModel = ( npm : string ) =>
177+ ( {
178+ id : "minimax/minimax-m3" ,
179+ providerID : "minimax" ,
180+ api : {
181+ id : "minimax-m3" ,
182+ url : "https://api.minimax.com" ,
183+ npm,
184+ } ,
185+ capabilities : { reasoning : true } ,
186+ limit : { output : 64_000 } ,
187+ } ) as any
188+
189+ test ( "explicitly enables adaptive thinking with the anthropic SDK" , ( ) => {
190+ expect (
191+ ProviderTransform . options ( {
192+ model : createModel ( "@ai-sdk/anthropic" ) ,
193+ sessionID : "test-session-123" ,
194+ } ) . thinking ,
195+ ) . toEqual ( { type : "adaptive" } )
196+ } )
197+
198+ test ( "uses the native default with the openai-compatible SDK" , ( ) => {
199+ expect (
200+ ProviderTransform . options ( {
201+ model : createModel ( "@ai-sdk/openai-compatible" ) ,
202+ sessionID : "test-session-123" ,
203+ } ) . thinking ,
204+ ) . toBeUndefined ( )
205+ } )
206+ } )
207+
175208describe ( "ProviderTransform.options - google thinkingConfig gating" , ( ) => {
176209 const sessionID = "test-session-123"
177210
@@ -2444,6 +2477,39 @@ describe("ProviderTransform.variants", () => {
24442477 expect ( result ) . toEqual ( { } )
24452478 } )
24462479
2480+ test ( "minimax m3 using anthropic returns thinking toggles" , ( ) => {
2481+ const model = createMockModel ( {
2482+ id : "minimax/minimax-m3" ,
2483+ providerID : "minimax" ,
2484+ api : {
2485+ id : "MiniMax-M3" ,
2486+ url : "https://api.minimax.com/anthropic/v1" ,
2487+ npm : "@ai-sdk/anthropic" ,
2488+ } ,
2489+ } )
2490+ const result = ProviderTransform . variants ( model )
2491+ expect ( result ) . toEqual ( {
2492+ none : { thinking : { type : "disabled" } } ,
2493+ thinking : { thinking : { type : "adaptive" } } ,
2494+ } )
2495+ } )
2496+
2497+ test ( "minimax m3 using openai-compatible returns thinking toggles" , ( ) => {
2498+ const model = createMockModel ( {
2499+ id : "minimax/minimax-m3" ,
2500+ providerID : "minimax" ,
2501+ api : {
2502+ id : "minimax-m3" ,
2503+ url : "https://api.minimax.com/v1" ,
2504+ npm : "@ai-sdk/openai-compatible" ,
2505+ } ,
2506+ } )
2507+ expect ( ProviderTransform . variants ( model ) ) . toEqual ( {
2508+ none : { thinking : { type : "disabled" } } ,
2509+ thinking : { thinking : { type : "adaptive" } } ,
2510+ } )
2511+ } )
2512+
24472513 test ( "glm returns empty object" , ( ) => {
24482514 const model = createMockModel ( {
24492515 id : "glm/glm-4" ,
0 commit comments