@@ -147,6 +147,15 @@ describe("supportedEfforts", () => {
147147 ] ) ;
148148 } ) ;
149149
150+ test ( "grok-4.7 includes xhigh" , ( ) => {
151+ expect ( supportedEfforts ( "grok-4.7" ) ) . toEqual ( [
152+ "low" ,
153+ "medium" ,
154+ "high" ,
155+ "xhigh" ,
156+ ] ) ;
157+ } ) ;
158+
150159 test ( "grok-4.5 stays on the unknown-model subset without xhigh" , ( ) => {
151160 expect ( supportedEfforts ( "grok-4.5" ) ) . toEqual ( [ "low" , "medium" , "high" ] ) ;
152161 } ) ;
@@ -223,6 +232,11 @@ describe("validateEffort", () => {
223232 expect ( validateEffort ( "grok-4.5" , "xhigh" ) . ok ) . toBe ( false ) ;
224233 } ) ;
225234
235+ test ( "accepts xhigh on grok-4.7" , ( ) => {
236+ expect ( validateEffort ( "grok-4.7" , "xhigh" ) ) . toEqual ( { ok : true } ) ;
237+ expect ( validateEffort ( "grok-4.7" , "minimal" ) . ok ) . toBe ( false ) ;
238+ } ) ;
239+
226240 test ( "accepts minimal on Muse Spark and rejects none" , ( ) => {
227241 expect ( validateEffort ( "muse-spark-1.3-contributor" , "minimal" ) ) . toEqual ( {
228242 ok : true ,
@@ -295,6 +309,12 @@ describe("cycleReasoningEffort", () => {
295309 expect ( cycleReasoningEffort ( "grok-4.6" , "high" ) ) . toBe ( "xhigh" ) ;
296310 expect ( cycleReasoningEffort ( "grok-4.6" , "xhigh" ) ) . toBe ( "low" ) ;
297311 } ) ;
312+
313+ test ( "wraps high to xhigh to low on grok-4.7" , ( ) => {
314+ expect ( cycleReasoningEffort ( "grok-4.7" , undefined ) ) . toBe ( "xhigh" ) ;
315+ expect ( cycleReasoningEffort ( "grok-4.7" , "high" ) ) . toBe ( "xhigh" ) ;
316+ expect ( cycleReasoningEffort ( "grok-4.7" , "xhigh" ) ) . toBe ( "low" ) ;
317+ } ) ;
298318} ) ;
299319
300320describe ( "reasoning capability gate" , ( ) => {
@@ -504,6 +524,7 @@ describe("defaultEffortForModel", () => {
504524 afterEach ( ( ) => setModelReasoningCapabilities ( { } ) ) ;
505525
506526 test ( "grok family defaults to high" , ( ) => {
527+ expect ( defaultEffortForModel ( "grok-4.7" ) ) . toBe ( "high" ) ;
507528 expect ( defaultEffortForModel ( "grok-4.6" ) ) . toBe ( "high" ) ;
508529 expect ( defaultEffortForModel ( "grok-4.5" ) ) . toBe ( "high" ) ;
509530 } ) ;
0 commit comments