@@ -606,7 +606,7 @@ function anthropicOpus47OrLater(apiId: string) {
606606}
607607
608608function anthropicAdaptiveEfforts ( apiId : string ) : string [ ] | null {
609- if ( anthropicOpus47OrLater ( apiId ) ) {
609+ if ( anthropicOpus47OrLater ( apiId ) || apiId . includes ( "fable-5" ) ) {
610610 return [ "low" , "medium" , "high" , "xhigh" , "max" ]
611611 }
612612 if (
@@ -619,6 +619,10 @@ function anthropicAdaptiveEfforts(apiId: string): string[] | null {
619619 return null
620620}
621621
622+ function anthropicOmitsThinking ( apiId : string ) {
623+ return anthropicOpus47OrLater ( apiId ) || apiId . includes ( "fable-5" )
624+ }
625+
622626function googleThinkingLevelEfforts ( apiId : string ) {
623627 const id = apiId . toLowerCase ( )
624628 if ( ! id . includes ( "gemini-3" ) ) return [ "low" , "high" ]
@@ -671,7 +675,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
671675 thinking : { thinking : { type : "adaptive" } } ,
672676 }
673677 }
674- const adaptiveOpus = anthropicOpus47OrLater ( model . api . id )
678+ const adaptiveThinkingOmitted = anthropicOmitsThinking ( model . api . id )
675679 const adaptiveEfforts = anthropicAdaptiveEfforts ( model . api . id )
676680 if (
677681 id . includes ( "deepseek-chat" ) ||
@@ -734,10 +738,10 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
734738 {
735739 thinking : {
736740 type : "adaptive" ,
737- // Opus 4.7+ flips the API default for `display` to "omitted", which
741+ // Newer adaptive-only models default `display` to "omitted", which
738742 // returns empty thinking blocks. Force "summarized" so summaries
739743 // survive (4.6/Sonnet 4.6 already default to "summarized").
740- ...( adaptiveOpus ? { display : "summarized" } : { } ) ,
744+ ...( adaptiveThinkingOmitted ? { display : "summarized" } : { } ) ,
741745 } ,
742746 effort,
743747 } ,
@@ -884,7 +888,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
884888 {
885889 thinking : {
886890 type : "adaptive" ,
887- ...( adaptiveOpus ? { display : "summarized" } : { } ) ,
891+ ...( adaptiveThinkingOmitted ? { display : "summarized" } : { } ) ,
888892 } ,
889893 effort,
890894 } ,
@@ -921,7 +925,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
921925 reasoningConfig : {
922926 type : "adaptive" ,
923927 maxReasoningEffort : effort ,
924- ...( adaptiveOpus ? { display : "summarized" } : { } ) ,
928+ ...( adaptiveThinkingOmitted ? { display : "summarized" } : { } ) ,
925929 } ,
926930 } ,
927931 ] ) ,
@@ -1011,7 +1015,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
10111015 adaptiveEfforts . map ( ( effort ) => [
10121016 effort ,
10131017 {
1014- thinking : { type : "adaptive" , ...( adaptiveOpus ? { display : "summarized" } : { } ) } ,
1018+ thinking : { type : "adaptive" , ...( adaptiveThinkingOmitted ? { display : "summarized" } : { } ) } ,
10151019 output_config : { effort } ,
10161020 } ,
10171021 ] ) ,
0 commit comments