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
8686 return "ChatGPT Pro 5x Subscription";
8787 case "team":
8888 return "ChatGPT Team Subscription";
89 case "self_serve_business_prolite":
8990 case "self_serve_business_usage_based":
9091 case "business":
9192 return "ChatGPT Business Subscription";
93 case "ent26":
94 case "enterprise_cbp_automation":
9295 case "enterprise_cbp_usage_based":
9396 case "enterprise":
9497 return "ChatGPT Enterprise Subscription";
9598 case "edu":
99 case "edu_plus":
100 case "edu_pro":
96101 return "ChatGPT Edu Subscription";
97102 case "unknown":
98103 return "ChatGPT Subscription";
packages/effect-codex-app-server/scripts/generate.ts+22
......@@ -166,6 +166,28 @@ const Codex0150DefinitionSchemas: Record<string, Schema.Json> = {
166166 type: "string",
167167 enum: ["inProgress", "completed", "failed", "interrupted"],
168168 },
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 },
169191 SubAgentActivityKind: {
170192 type: "string",
171193 enum: ["started", "interacted", "interrupted", "completed"],
packages/effect-codex-app-server/src/_generated/schema.gen.ts+50
......@@ -2411,11 +2411,16 @@ export type ServerNotification__PlanType =
24112411 | "pro"
24122412 | "prolite"
24132413 | "team"
2414 | "self_serve_business_prolite"
24142415 | "self_serve_business_usage_based"
24152416 | "business"
2417 | "ent26"
2418 | "enterprise_cbp_automation"
24162419 | "enterprise_cbp_usage_based"
24172420 | "enterprise"
24182421 | "edu"
2422 | "edu_plus"
2423 | "edu_pro"
24192424 | "unknown";
24202425export const ServerNotification__PlanType = Schema.Literals([
24212426 "free",
......@@ -2424,11 +2429,16 @@ export const ServerNotification__PlanType = Schema.Literals([
24242429 "pro",
24252430 "prolite",
24262431 "team",
2432 "self_serve_business_prolite",
24272433 "self_serve_business_usage_based",
24282434 "business",
2435 "ent26",
2436 "enterprise_cbp_automation",
24292437 "enterprise_cbp_usage_based",
24302438 "enterprise",
24312439 "edu",
2440 "edu_plus",
2441 "edu_pro",
24322442 "unknown",
24332443]);
24342444
......@@ -3248,11 +3258,16 @@ export type V2AccountRateLimitsUpdatedNotification__PlanType =
32483258 | "pro"
32493259 | "prolite"
32503260 | "team"
3261 | "self_serve_business_prolite"
32513262 | "self_serve_business_usage_based"
32523263 | "business"
3264 | "ent26"
3265 | "enterprise_cbp_automation"
32533266 | "enterprise_cbp_usage_based"
32543267 | "enterprise"
32553268 | "edu"
3269 | "edu_plus"
3270 | "edu_pro"
32563271 | "unknown";
32573272export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals([
32583273 "free",
......@@ -3261,11 +3276,16 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(
32613276 "pro",
32623277 "prolite",
32633278 "team",
3279 "self_serve_business_prolite",
32643280 "self_serve_business_usage_based",
32653281 "business",
3282 "ent26",
3283 "enterprise_cbp_automation",
32663284 "enterprise_cbp_usage_based",
32673285 "enterprise",
32683286 "edu",
3287 "edu_plus",
3288 "edu_pro",
32693289 "unknown",
32703290]);
32713291
......@@ -3336,11 +3356,16 @@ export type V2AccountUpdatedNotification__PlanType =
33363356 | "pro"
33373357 | "prolite"
33383358 | "team"
3359 | "self_serve_business_prolite"
33393360 | "self_serve_business_usage_based"
33403361 | "business"
3362 | "ent26"
3363 | "enterprise_cbp_automation"
33413364 | "enterprise_cbp_usage_based"
33423365 | "enterprise"
33433366 | "edu"
3367 | "edu_plus"
3368 | "edu_pro"
33443369 | "unknown";
33453370export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
33463371 "free",
......@@ -3349,11 +3374,16 @@ export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
33493374 "pro",
33503375 "prolite",
33513376 "team",
3377 "self_serve_business_prolite",
33523378 "self_serve_business_usage_based",
33533379 "business",
3380 "ent26",
3381 "enterprise_cbp_automation",
33543382 "enterprise_cbp_usage_based",
33553383 "enterprise",
33563384 "edu",
3385 "edu_plus",
3386 "edu_pro",
33573387 "unknown",
33583388]);
33593389
......@@ -4140,11 +4170,16 @@ export type V2GetAccountRateLimitsResponse__PlanType =
41404170 | "pro"
41414171 | "prolite"
41424172 | "team"
4173 | "self_serve_business_prolite"
41434174 | "self_serve_business_usage_based"
41444175 | "business"
4176 | "ent26"
4177 | "enterprise_cbp_automation"
41454178 | "enterprise_cbp_usage_based"
41464179 | "enterprise"
41474180 | "edu"
4181 | "edu_plus"
4182 | "edu_pro"
41484183 | "unknown";
41494184export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
41504185 "free",
......@@ -4153,11 +4188,16 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
41534188 "pro",
41544189 "prolite",
41554190 "team",
4191 "self_serve_business_prolite",
41564192 "self_serve_business_usage_based",
41574193 "business",
4194 "ent26",
4195 "enterprise_cbp_automation",
41584196 "enterprise_cbp_usage_based",
41594197 "enterprise",
41604198 "edu",
4199 "edu_plus",
4200 "edu_pro",
41614201 "unknown",
41624202]);
41634203
......@@ -4228,11 +4268,16 @@ export type V2GetAccountResponse__PlanType =
42284268 | "pro"
42294269 | "prolite"
42304270 | "team"
4271 | "self_serve_business_prolite"
42314272 | "self_serve_business_usage_based"
42324273 | "business"
4274 | "ent26"
4275 | "enterprise_cbp_automation"
42334276 | "enterprise_cbp_usage_based"
42344277 | "enterprise"
42354278 | "edu"
4279 | "edu_plus"
4280 | "edu_pro"
42364281 | "unknown";
42374282export const V2GetAccountResponse__PlanType = Schema.Literals([
42384283 "free",
......@@ -4241,11 +4286,16 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([
42414286 "pro",
42424287 "prolite",
42434288 "team",
4289 "self_serve_business_prolite",
42444290 "self_serve_business_usage_based",
42454291 "business",
4292 "ent26",
4293 "enterprise_cbp_automation",
42464294 "enterprise_cbp_usage_based",
42474295 "enterprise",
42484296 "edu",
4297 "edu_plus",
4298 "edu_pro",
42494299 "unknown",
42504300]);
42514301
packages/effect-codex-app-server/src/schema.test.ts+25
......@@ -3,6 +3,8 @@ import * as Schema from "effect/Schema";
33
44import * as CodexSchema from "./schema.ts";
55
6const isGetAccountResponse = Schema.is(CodexSchema.V2GetAccountResponse);
7
68it("accepts Codex 0.150 multi-agent values", () => {
79 const schemas = [
810 CodexSchema.ServerNotification__SubAgentActivityKind,
......@@ -71,3 +73,26 @@ it("accepts Codex 0.150 multi-agent values", () => {
7173
7274 assert.equal(Schema.is(CodexSchema.V2ThreadResumeResponse)(resumeResponse), true);
7375});
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});