@@ -1149,6 +1149,7 @@ describe("codex-auth API", () => {
11491149 { id :
"exhausted" , email :
"[email protected] " , plan :
"plus" , isMain :
false } , 11501150 { id :
"available" , email :
"[email protected] " , plan :
"plus" , isMain :
false } , 11511151 { id :
"free-weekly-only" , email :
"[email protected] " , plan :
"free" , isMain :
false } , 1152+ { id :
"upgraded-plus" , email :
"[email protected] " , plan :
"free" , isMain :
false } , 11521153 { id :
"stale-unknown" , email :
"[email protected] " , plan :
"plus" , isMain :
false } , 11531154 { id :
"already-paused" , email :
"[email protected] " , plan :
"plus" , isMain :
false } , 11541155 ] ,
@@ -1169,10 +1170,10 @@ describe("codex-auth API", () => {
11691170 globalThis . fetch = ( async ( _input : RequestInfo | URL , init ?: RequestInit ) => {
11701171 const accountId = new Headers ( init ?. headers ) . get ( "ChatGPT-Account-Id" ) ;
11711172 if ( accountId === "stale-unknown" ) return new Response ( null , { status : 502 } ) ;
1172- const weekly = accountId === "exhausted" || accountId === "already-paused" || accountId === "free-weekly-only"
1173+ const weekly = accountId === "exhausted" || accountId === "already-paused" || accountId === "free-weekly-only" || accountId === "upgraded-plus"
11731174 ? 100
11741175 : 72 ;
1175- const monthly = accountId === "free-weekly-only" ? 20 : 40 ;
1176+ const monthly = accountId === "free-weekly-only" || accountId === "upgraded-plus" ? 20 : 40 ;
11761177 return Response . json ( {
11771178 plan_type : accountId === "free-weekly-only" ? "free" : "plus" ,
11781179 rate_limit : {
@@ -1187,12 +1188,12 @@ describe("codex-auth API", () => {
11871188
11881189 expect ( resp ! . status ) . toBe ( 200 ) ;
11891190 expect ( await resp ! . json ( ) ) . toMatchObject ( {
1190- pausedAccountIds : [ "exhausted" ] ,
1191- pausedCount : 1 ,
1191+ pausedAccountIds : [ "exhausted" , "upgraded-plus" ] ,
1192+ pausedCount : 2 ,
11921193 activeCodexAccountId : null ,
11931194 appliesImmediately : true ,
11941195 } ) ;
1195- expect ( config . pausedCodexAccountIds ) . toEqual ( [ "already-paused" , "exhausted" ] ) ;
1196+ expect ( config . pausedCodexAccountIds ) . toEqual ( [ "already-paused" , "exhausted" , "upgraded-plus" ] ) ;
11961197 expect ( resolveCodexAccountForThread ( "bulk-pause-thread" , config ) ) . toBe ( "free-weekly-only" ) ;
11971198 } ) ;
11981199
0 commit comments