@@ -175,6 +175,39 @@ describe("ProviderTransform.options - zai/zhipuai thinking", () => {
175175 }
176176} )
177177
178+ describe ( "ProviderTransform.options - minimax m3 thinking" , ( ) => {
179+ const createModel = ( npm : string ) =>
180+ ( {
181+ id : "minimax/minimax-m3" ,
182+ providerID : "minimax" ,
183+ api : {
184+ id : "minimax-m3" ,
185+ url : "https://api.minimax.com" ,
186+ npm,
187+ } ,
188+ capabilities : { reasoning : true } ,
189+ limit : { output : 64_000 } ,
190+ } ) as any
191+
192+ test ( "explicitly enables adaptive thinking with the anthropic SDK" , ( ) => {
193+ expect (
194+ ProviderTransform . options ( {
195+ model : createModel ( "@ai-sdk/anthropic" ) ,
196+ sessionID : "test-session-123" ,
197+ } ) . thinking ,
198+ ) . toEqual ( { type : "adaptive" } )
199+ } )
200+
201+ test ( "uses the native default with the openai-compatible SDK" , ( ) => {
202+ expect (
203+ ProviderTransform . options ( {
204+ model : createModel ( "@ai-sdk/openai-compatible" ) ,
205+ sessionID : "test-session-123" ,
206+ } ) . thinking ,
207+ ) . toBeUndefined ( )
208+ } )
209+ } )
210+
178211describe ( "ProviderTransform.options - google thinkingConfig gating" , ( ) => {
179212 const sessionID = "test-session-123"
180213
@@ -2452,6 +2485,39 @@ describe("ProviderTransform.variants", () => {
24522485 expect ( result ) . toEqual ( { } )
24532486 } )
24542487
2488+ test ( "minimax m3 using anthropic returns thinking toggles" , ( ) => {
2489+ const model = createMockModel ( {
2490+ id : "minimax/minimax-m3" ,
2491+ providerID : "minimax" ,
2492+ api : {
2493+ id : "MiniMax-M3" ,
2494+ url : "https://api.minimax.com/anthropic/v1" ,
2495+ npm : "@ai-sdk/anthropic" ,
2496+ } ,
2497+ } )
2498+ const result = ProviderTransform . variants ( model )
2499+ expect ( result ) . toEqual ( {
2500+ none : { thinking : { type : "disabled" } } ,
2501+ thinking : { thinking : { type : "adaptive" } } ,
2502+ } )
2503+ } )
2504+
2505+ test ( "minimax m3 using openai-compatible returns thinking toggles" , ( ) => {
2506+ const model = createMockModel ( {
2507+ id : "minimax/minimax-m3" ,
2508+ providerID : "minimax" ,
2509+ api : {
2510+ id : "minimax-m3" ,
2511+ url : "https://api.minimax.com/v1" ,
2512+ npm : "@ai-sdk/openai-compatible" ,
2513+ } ,
2514+ } )
2515+ expect ( ProviderTransform . variants ( model ) ) . toEqual ( {
2516+ none : { thinking : { type : "disabled" } } ,
2517+ thinking : { thinking : { type : "adaptive" } } ,
2518+ } )
2519+ } )
2520+
24552521 test ( "glm returns empty object" , ( ) => {
24562522 const model = createMockModel ( {
24572523 id : "glm/glm-4" ,
0 commit comments