@@ -77,6 +77,18 @@ describe("supportedEfforts", () => {
7777 test ( "unknown model gets the safe subset" , ( ) => {
7878 expect ( supportedEfforts ( "some-random-model" ) ) . toEqual ( [ "low" , "medium" , "high" ] ) ;
7979 } ) ;
80+
81+ test ( "grok-4.6 includes xhigh" , ( ) => {
82+ expect ( supportedEfforts ( "grok-4.6" ) ) . toEqual ( [ "low" , "medium" , "high" , "xhigh" ] ) ;
83+ } ) ;
84+
85+ test ( "grok-4.5 stays on the unknown-model subset without xhigh" , ( ) => {
86+ expect ( supportedEfforts ( "grok-4.5" ) ) . toEqual ( [ "low" , "medium" , "high" ] ) ;
87+ } ) ;
88+
89+ test ( "grok-composer-2.5-fast stays on the unknown-model subset without xhigh" , ( ) => {
90+ expect ( supportedEfforts ( "grok-composer-2.5-fast" ) ) . toEqual ( [ "low" , "medium" , "high" ] ) ;
91+ } ) ;
8092} ) ;
8193
8294describe ( "validateEffort" , ( ) => {
@@ -97,6 +109,11 @@ describe("validateEffort", () => {
97109 expect ( validateEffort ( "unknown" , "xhigh" ) . ok ) . toBe ( false ) ;
98110 expect ( validateEffort ( "unknown" , "minimal" ) . ok ) . toBe ( false ) ;
99111 } ) ;
112+
113+ test ( "accepts xhigh on grok-4.6 and rejects it on grok-4.5" , ( ) => {
114+ expect ( validateEffort ( "grok-4.6" , "xhigh" ) ) . toEqual ( { ok : true } ) ;
115+ expect ( validateEffort ( "grok-4.5" , "xhigh" ) . ok ) . toBe ( false ) ;
116+ } ) ;
100117} ) ;
101118
102119describe ( "cycleReasoningEffort" , ( ) => {
@@ -118,6 +135,11 @@ describe("cycleReasoningEffort", () => {
118135 setModelReasoningCapabilities ( { "chat-only-model" : false } ) ;
119136 expect ( cycleReasoningEffort ( "chat-only-model" , "medium" ) ) . toBeUndefined ( ) ;
120137 } ) ;
138+
139+ test ( "wraps high to xhigh to low on grok-4.6" , ( ) => {
140+ expect ( cycleReasoningEffort ( "grok-4.6" , "high" ) ) . toBe ( "xhigh" ) ;
141+ expect ( cycleReasoningEffort ( "grok-4.6" , "xhigh" ) ) . toBe ( "low" ) ;
142+ } ) ;
121143} ) ;
122144
123145describe ( "reasoning capability gate" , ( ) => {
0 commit comments