@@ -17,7 +17,7 @@ function fastModeDescriptor(
1717}
1818
1919function serviceTierDescriptor (
20- currentValue : "default" | "priority" | "flex" ,
20+ currentValue : "default" | "priority" | "ultrafast" | " flex",
2121) : Extract < ProviderOptionDescriptor , { type : "select" } > {
2222 return {
2323 id : "serviceTier" ,
@@ -26,6 +26,7 @@ function serviceTierDescriptor(
2626 options : [
2727 { id : "default" , label : "Standard" , isDefault : true } ,
2828 { id : "priority" , label : "Fast" } ,
29+ { id : "ultrafast" , label : "Ultrafast" } ,
2930 { id : "flex" , label : "Flex" } ,
3031 ] ,
3132 currentValue,
@@ -64,43 +65,70 @@ describe("buildTraitsTriggerDisplay", () => {
6465 it ( "omits fast mode from the label entirely when it is off" , ( ) => {
6566 expect ( display ( [ EFFORT , fastModeDescriptor ( false ) , CONTEXT_WINDOW ] ) ) . toEqual ( {
6667 label : "High · 1M" ,
67- showFastModeIcon : false ,
68+ speedIcon : null ,
6869 } ) ;
6970 } ) ;
7071
7172 it ( "shows the bolt instead of a text label when fast mode is on" , ( ) => {
7273 expect ( display ( [ EFFORT , fastModeDescriptor ( true ) , CONTEXT_WINDOW ] ) ) . toEqual ( {
7374 label : "High · 1M" ,
74- showFastModeIcon : true ,
75+ speedIcon : "fast" ,
7576 } ) ;
7677 } ) ;
7778
7879 it ( "treats Codex standard and fast service tiers as fast mode states" , ( ) => {
7980 expect ( display ( [ EFFORT , serviceTierDescriptor ( "default" ) ] ) ) . toEqual ( {
8081 label : "High" ,
81- showFastModeIcon : false ,
82+ speedIcon : null ,
8283 } ) ;
8384 expect ( display ( [ EFFORT , serviceTierDescriptor ( "priority" ) ] ) ) . toEqual ( {
8485 label : "High" ,
85- showFastModeIcon : true ,
86+ speedIcon : "fast" ,
87+ } ) ;
88+ } ) ;
89+
90+ it ( "uses a distinct double bolt for Codex Ultrafast" , ( ) => {
91+ expect ( display ( [ EFFORT , serviceTierDescriptor ( "ultrafast" ) ] ) ) . toEqual ( {
92+ label : "High" ,
93+ speedIcon : "ultrafast" ,
94+ } ) ;
95+ } ) ;
96+
97+ it ( "uses Ultrafast without requiring a Fast tier" , ( ) => {
98+ const descriptor = serviceTierDescriptor ( "ultrafast" ) ;
99+ expect (
100+ display ( [
101+ EFFORT ,
102+ { ...descriptor , options : descriptor . options . filter ( ( { id } ) => id !== "priority" ) } ,
103+ ] ) ,
104+ ) . toEqual ( {
105+ label : "High" ,
106+ speedIcon : "ultrafast" ,
86107 } ) ;
87108 } ) ;
88109
89110 it ( "keeps other Codex service tiers in the label" , ( ) => {
90111 expect ( display ( [ EFFORT , serviceTierDescriptor ( "flex" ) ] ) ) . toEqual ( {
91112 label : "High · Flex" ,
92- showFastModeIcon : false ,
113+ speedIcon : null ,
93114 } ) ;
94115 } ) ;
95116
96117 it ( "keeps the Codex service tier readable when it is the only trait" , ( ) => {
97118 expect ( display ( [ serviceTierDescriptor ( "default" ) ] ) ) . toEqual ( {
98119 label : "Standard" ,
99- showFastModeIcon : false ,
120+ speedIcon : null ,
100121 } ) ;
101122 expect ( display ( [ serviceTierDescriptor ( "priority" ) ] ) ) . toEqual ( {
102123 label : "Fast" ,
103- showFastModeIcon : false ,
124+ speedIcon : null ,
125+ } ) ;
126+ } ) ;
127+
128+ it ( "keeps Ultrafast readable when it is the only trait" , ( ) => {
129+ expect ( display ( [ serviceTierDescriptor ( "ultrafast" ) ] ) ) . toEqual ( {
130+ label : "Ultrafast" ,
131+ speedIcon : null ,
104132 } ) ;
105133 } ) ;
106134
@@ -113,18 +141,18 @@ describe("buildTraitsTriggerDisplay", () => {
113141 } ;
114142 expect ( display ( [ EFFORT , thinking ] ) ) . toEqual ( {
115143 label : "High · Thinking On" ,
116- showFastModeIcon : false ,
144+ speedIcon : null ,
117145 } ) ;
118146 } ) ;
119147
120148 it ( "falls back to a text label when fast mode is the only trait" , ( ) => {
121149 expect ( display ( [ fastModeDescriptor ( true ) ] ) ) . toEqual ( {
122150 label : "Fast" ,
123- showFastModeIcon : false ,
151+ speedIcon : null ,
124152 } ) ;
125153 expect ( display ( [ fastModeDescriptor ( false ) ] ) ) . toEqual ( {
126154 label : "Normal" ,
127- showFastModeIcon : false ,
155+ speedIcon : null ,
128156 } ) ;
129157 } ) ;
130158
@@ -141,7 +169,7 @@ describe("buildTraitsTriggerDisplay", () => {
141169 { id : "high" , label : "High" } ,
142170 ] ,
143171 } ;
144- expect ( display ( [ unresolved ] ) ) . toEqual ( { label : "" , showFastModeIcon : false } ) ;
172+ expect ( display ( [ unresolved ] ) ) . toEqual ( { label : "" , speedIcon : null } ) ;
145173 } ) ;
146174
147175 it ( "still renders the prompt-controlled ultrathink label alongside the bolt" , ( ) => {
@@ -152,7 +180,7 @@ describe("buildTraitsTriggerDisplay", () => {
152180 primarySelectDescriptorId : "reasoningEffort" ,
153181 ultrathinkPromptControlled : true ,
154182 } ) ,
155- ) . toEqual ( { label : "Ultrathink" , showFastModeIcon : true } ) ;
183+ ) . toEqual ( { label : "Ultrathink" , speedIcon : "fast" } ) ;
156184 } ) ;
157185} ) ;
158186
0 commit comments