authorgravatar for gianmarcosimone89@gmail.comGianmarco <gianmarcosimone89@gmail.com> 2026-08-28 00:27:07+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-27 15:27:07-07:00
log94401d01b956828eaa989ff4a80046c20d7b6088
treefba69847813f95f9f4a624168dc73dd1cb355b9e
parente2d4d12a81516b55abbecdc64794971f781cacd8
signature Signed by PGP key B5690EEEBB952194

fix(codex): accept Codex 0.150 account plans (#8447)


4 files changed, 102 insertions(+), 0 deletions(-)

apps/server/src/provider/Layers/CodexProvider.ts+5
...@@ -86,13 +86,18 @@ function codexAccountAuthLabel(account: CodexSchema.V2GetAccountResponse["accoun...@@ -86,13 +86,18 @@ function codexAccountAuthLabel(account: CodexSchema.V2GetAccountResponse["accoun
86 return "ChatGPT Pro 5x Subscription";86 return "ChatGPT Pro 5x Subscription";
87 case "team":87 case "team":
88 return "ChatGPT Team Subscription";88 return "ChatGPT Team Subscription";
89 case "self_serve_business_prolite":
89 case "self_serve_business_usage_based":90 case "self_serve_business_usage_based":
90 case "business":91 case "business":
91 return "ChatGPT Business Subscription";92 return "ChatGPT Business Subscription";
93 case "ent26":
94 case "enterprise_cbp_automation":
92 case "enterprise_cbp_usage_based":95 case "enterprise_cbp_usage_based":
93 case "enterprise":96 case "enterprise":
94 return "ChatGPT Enterprise Subscription";97 return "ChatGPT Enterprise Subscription";
95 case "edu":98 case "edu":
99 case "edu_plus":
100 case "edu_pro":
96 return "ChatGPT Edu Subscription";101 return "ChatGPT Edu Subscription";
97 case "unknown":102 case "unknown":
98 return "ChatGPT Subscription";103 return "ChatGPT Subscription";
packages/effect-codex-app-server/scripts/generate.ts+22
...@@ -166,6 +166,28 @@ const Codex0150DefinitionSchemas: Record<string, Schema.Json> = {...@@ -166,6 +166,28 @@ const Codex0150DefinitionSchemas: Record<string, Schema.Json> = {
166 type: "string",166 type: "string",
167 enum: ["inProgress", "completed", "failed", "interrupted"],167 enum: ["inProgress", "completed", "failed", "interrupted"],
168 },168 },
169 PlanType: {
170 type: "string",
171 enum: [
172 "free",
173 "go",
174 "plus",
175 "pro",
176 "prolite",
177 "team",
178 "self_serve_business_prolite",
179 "self_serve_business_usage_based",
180 "business",
181 "ent26",
182 "enterprise_cbp_automation",
183 "enterprise_cbp_usage_based",
184 "enterprise",
185 "edu",
186 "edu_plus",
187 "edu_pro",
188 "unknown",
189 ],
190 },
169 SubAgentActivityKind: {191 SubAgentActivityKind: {
170 type: "string",192 type: "string",
171 enum: ["started", "interacted", "interrupted", "completed"],193 enum: ["started", "interacted", "interrupted", "completed"],
packages/effect-codex-app-server/src/_generated/schema.gen.ts+50
...@@ -2411,11 +2411,16 @@ export type ServerNotification__PlanType =...@@ -2411,11 +2411,16 @@ export type ServerNotification__PlanType =
2411 | "pro"2411 | "pro"
2412 | "prolite"2412 | "prolite"
2413 | "team"2413 | "team"
2414 | "self_serve_business_prolite"
2414 | "self_serve_business_usage_based"2415 | "self_serve_business_usage_based"
2415 | "business"2416 | "business"
2417 | "ent26"
2418 | "enterprise_cbp_automation"
2416 | "enterprise_cbp_usage_based"2419 | "enterprise_cbp_usage_based"
2417 | "enterprise"2420 | "enterprise"
2418 | "edu"2421 | "edu"
2422 | "edu_plus"
2423 | "edu_pro"
2419 | "unknown";2424 | "unknown";
2420export const ServerNotification__PlanType = Schema.Literals([2425export const ServerNotification__PlanType = Schema.Literals([
2421 "free",2426 "free",
...@@ -2424,11 +2429,16 @@ export const ServerNotification__PlanType = Schema.Literals([...@@ -2424,11 +2429,16 @@ export const ServerNotification__PlanType = Schema.Literals([
2424 "pro",2429 "pro",
2425 "prolite",2430 "prolite",
2426 "team",2431 "team",
2432 "self_serve_business_prolite",
2427 "self_serve_business_usage_based",2433 "self_serve_business_usage_based",
2428 "business",2434 "business",
2435 "ent26",
2436 "enterprise_cbp_automation",
2429 "enterprise_cbp_usage_based",2437 "enterprise_cbp_usage_based",
2430 "enterprise",2438 "enterprise",
2431 "edu",2439 "edu",
2440 "edu_plus",
2441 "edu_pro",
2432 "unknown",2442 "unknown",
2433]);2443]);
24342444
...@@ -3248,11 +3258,16 @@ export type V2AccountRateLimitsUpdatedNotification__PlanType =...@@ -3248,11 +3258,16 @@ export type V2AccountRateLimitsUpdatedNotification__PlanType =
3248 | "pro"3258 | "pro"
3249 | "prolite"3259 | "prolite"
3250 | "team"3260 | "team"
3261 | "self_serve_business_prolite"
3251 | "self_serve_business_usage_based"3262 | "self_serve_business_usage_based"
3252 | "business"3263 | "business"
3264 | "ent26"
3265 | "enterprise_cbp_automation"
3253 | "enterprise_cbp_usage_based"3266 | "enterprise_cbp_usage_based"
3254 | "enterprise"3267 | "enterprise"
3255 | "edu"3268 | "edu"
3269 | "edu_plus"
3270 | "edu_pro"
3256 | "unknown";3271 | "unknown";
3257export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals([3272export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals([
3258 "free",3273 "free",
...@@ -3261,11 +3276,16 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(...@@ -3261,11 +3276,16 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(
3261 "pro",3276 "pro",
3262 "prolite",3277 "prolite",
3263 "team",3278 "team",
3279 "self_serve_business_prolite",
3264 "self_serve_business_usage_based",3280 "self_serve_business_usage_based",
3265 "business",3281 "business",
3282 "ent26",
3283 "enterprise_cbp_automation",
3266 "enterprise_cbp_usage_based",3284 "enterprise_cbp_usage_based",
3267 "enterprise",3285 "enterprise",
3268 "edu",3286 "edu",
3287 "edu_plus",
3288 "edu_pro",
3269 "unknown",3289 "unknown",
3270]);3290]);
32713291
...@@ -3336,11 +3356,16 @@ export type V2AccountUpdatedNotification__PlanType =...@@ -3336,11 +3356,16 @@ export type V2AccountUpdatedNotification__PlanType =
3336 | "pro"3356 | "pro"
3337 | "prolite"3357 | "prolite"
3338 | "team"3358 | "team"
3359 | "self_serve_business_prolite"
3339 | "self_serve_business_usage_based"3360 | "self_serve_business_usage_based"
3340 | "business"3361 | "business"
3362 | "ent26"
3363 | "enterprise_cbp_automation"
3341 | "enterprise_cbp_usage_based"3364 | "enterprise_cbp_usage_based"
3342 | "enterprise"3365 | "enterprise"
3343 | "edu"3366 | "edu"
3367 | "edu_plus"
3368 | "edu_pro"
3344 | "unknown";3369 | "unknown";
3345export const V2AccountUpdatedNotification__PlanType = Schema.Literals([3370export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
3346 "free",3371 "free",
...@@ -3349,11 +3374,16 @@ export const V2AccountUpdatedNotification__PlanType = Schema.Literals([...@@ -3349,11 +3374,16 @@ export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
3349 "pro",3374 "pro",
3350 "prolite",3375 "prolite",
3351 "team",3376 "team",
3377 "self_serve_business_prolite",
3352 "self_serve_business_usage_based",3378 "self_serve_business_usage_based",
3353 "business",3379 "business",
3380 "ent26",
3381 "enterprise_cbp_automation",
3354 "enterprise_cbp_usage_based",3382 "enterprise_cbp_usage_based",
3355 "enterprise",3383 "enterprise",
3356 "edu",3384 "edu",
3385 "edu_plus",
3386 "edu_pro",
3357 "unknown",3387 "unknown",
3358]);3388]);
33593389
...@@ -4140,11 +4170,16 @@ export type V2GetAccountRateLimitsResponse__PlanType =...@@ -4140,11 +4170,16 @@ export type V2GetAccountRateLimitsResponse__PlanType =
4140 | "pro"4170 | "pro"
4141 | "prolite"4171 | "prolite"
4142 | "team"4172 | "team"
4173 | "self_serve_business_prolite"
4143 | "self_serve_business_usage_based"4174 | "self_serve_business_usage_based"
4144 | "business"4175 | "business"
4176 | "ent26"
4177 | "enterprise_cbp_automation"
4145 | "enterprise_cbp_usage_based"4178 | "enterprise_cbp_usage_based"
4146 | "enterprise"4179 | "enterprise"
4147 | "edu"4180 | "edu"
4181 | "edu_plus"
4182 | "edu_pro"
4148 | "unknown";4183 | "unknown";
4149export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([4184export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
4150 "free",4185 "free",
...@@ -4153,11 +4188,16 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([...@@ -4153,11 +4188,16 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
4153 "pro",4188 "pro",
4154 "prolite",4189 "prolite",
4155 "team",4190 "team",
4191 "self_serve_business_prolite",
4156 "self_serve_business_usage_based",4192 "self_serve_business_usage_based",
4157 "business",4193 "business",
4194 "ent26",
4195 "enterprise_cbp_automation",
4158 "enterprise_cbp_usage_based",4196 "enterprise_cbp_usage_based",
4159 "enterprise",4197 "enterprise",
4160 "edu",4198 "edu",
4199 "edu_plus",
4200 "edu_pro",
4161 "unknown",4201 "unknown",
4162]);4202]);
41634203
...@@ -4228,11 +4268,16 @@ export type V2GetAccountResponse__PlanType =...@@ -4228,11 +4268,16 @@ export type V2GetAccountResponse__PlanType =
4228 | "pro"4268 | "pro"
4229 | "prolite"4269 | "prolite"
4230 | "team"4270 | "team"
4271 | "self_serve_business_prolite"
4231 | "self_serve_business_usage_based"4272 | "self_serve_business_usage_based"
4232 | "business"4273 | "business"
4274 | "ent26"
4275 | "enterprise_cbp_automation"
4233 | "enterprise_cbp_usage_based"4276 | "enterprise_cbp_usage_based"
4234 | "enterprise"4277 | "enterprise"
4235 | "edu"4278 | "edu"
4279 | "edu_plus"
4280 | "edu_pro"
4236 | "unknown";4281 | "unknown";
4237export const V2GetAccountResponse__PlanType = Schema.Literals([4282export const V2GetAccountResponse__PlanType = Schema.Literals([
4238 "free",4283 "free",
...@@ -4241,11 +4286,16 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([...@@ -4241,11 +4286,16 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([
4241 "pro",4286 "pro",
4242 "prolite",4287 "prolite",
4243 "team",4288 "team",
4289 "self_serve_business_prolite",
4244 "self_serve_business_usage_based",4290 "self_serve_business_usage_based",
4245 "business",4291 "business",
4292 "ent26",
4293 "enterprise_cbp_automation",
4246 "enterprise_cbp_usage_based",4294 "enterprise_cbp_usage_based",
4247 "enterprise",4295 "enterprise",
4248 "edu",4296 "edu",
4297 "edu_plus",
4298 "edu_pro",
4249 "unknown",4299 "unknown",
4250]);4300]);
42514301
packages/effect-codex-app-server/src/schema.test.ts+25
...@@ -3,6 +3,8 @@ import * as Schema from "effect/Schema";...@@ -3,6 +3,8 @@ import * as Schema from "effect/Schema";
33
4import * as CodexSchema from "./schema.ts";4import * as CodexSchema from "./schema.ts";
55
6const isGetAccountResponse = Schema.is(CodexSchema.V2GetAccountResponse);
7
6it("accepts Codex 0.150 multi-agent values", () => {8it("accepts Codex 0.150 multi-agent values", () => {
7 const schemas = [9 const schemas = [
8 CodexSchema.ServerNotification__SubAgentActivityKind,10 CodexSchema.ServerNotification__SubAgentActivityKind,
...@@ -71,3 +73,26 @@ it("accepts Codex 0.150 multi-agent values", () => {...@@ -71,3 +73,26 @@ it("accepts Codex 0.150 multi-agent values", () => {
7173
72 assert.equal(Schema.is(CodexSchema.V2ThreadResumeResponse)(resumeResponse), true);74 assert.equal(Schema.is(CodexSchema.V2ThreadResumeResponse)(resumeResponse), true);
73});75});
76
77it("accepts Codex 0.150 account plan values", () => {
78 const planTypes = [
79 "self_serve_business_prolite",
80 "ent26",
81 "enterprise_cbp_automation",
82 "edu_plus",
83 "edu_pro",
84 ];
85
86 for (const planType of planTypes) {
87 const accountResponse = {
88 account: {
89 email: "user@example.com",
90 planType,
91 type: "chatgpt",
92 },
93 requiresOpenaiAuth: true,
94 };
95
96 assert.equal(isGetAccountResponse(accountResponse), true);
97 }
98});