The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 14:00 UTC
fix(codex): accept Codex 0.150 account plans (#8447)
Gianmarco committed
Aug 28, 2026 at 00:27 UTC
94401d01b956828eaa989ff4a80046c20d7b6088
4 files changed
+102
apps/server/src/provider/Layers/CodexProvider.ts
+5
@@ -86,13 +86,18 @@ function codexAccountAuthLabel(account: CodexSchema.V2GetAccountResponse["accoun
86
return "ChatGPT Pro 5x Subscription";
87
case "team":
88
return "ChatGPT Team Subscription";
89
+ case "self_serve_business_prolite":
90
case "self_serve_business_usage_based":
91
case "business":
92
return "ChatGPT Business Subscription";
93
+ case "ent26":
94
+ case "enterprise_cbp_automation":
95
case "enterprise_cbp_usage_based":
96
case "enterprise":
97
return "ChatGPT Enterprise Subscription";
98
case "edu":
99
+ case "edu_plus":
100
+ case "edu_pro":
101
return "ChatGPT Edu Subscription";
102
case "unknown":
103
return "ChatGPT Subscription";
packages/effect-codex-app-server/scripts/generate.ts
+22
@@ -166,6 +166,28 @@ const Codex0150DefinitionSchemas: Record<string, Schema.Json> = {
166
type: "string",
167
enum: ["inProgress", "completed", "failed", "interrupted"],
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
+ },
191
SubAgentActivityKind: {
192
type: "string",
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
| "pro"
2412
| "prolite"
2413
| "team"
2414
+ | "self_serve_business_prolite"
2415
| "self_serve_business_usage_based"
2416
| "business"
2417
+ | "ent26"
2418
+ | "enterprise_cbp_automation"
2419
| "enterprise_cbp_usage_based"
2420
| "enterprise"
2421
| "edu"
2422
+ | "edu_plus"
2423
+ | "edu_pro"
2424
| "unknown";
2425
export const ServerNotification__PlanType = Schema.Literals([
2426
"free",
@@ -2424,11 +2429,16 @@ export const ServerNotification__PlanType = Schema.Literals([
2429
"pro",
2430
"prolite",
2431
"team",
2432
+ "self_serve_business_prolite",
2433
"self_serve_business_usage_based",
2434
"business",
2435
+ "ent26",
2436
+ "enterprise_cbp_automation",
2437
"enterprise_cbp_usage_based",
2438
"enterprise",
2439
"edu",
2440
+ "edu_plus",
2441
+ "edu_pro",
2442
"unknown",
2443
]);
2444
@@ -3248,11 +3258,16 @@ export type V2AccountRateLimitsUpdatedNotification__PlanType =
3258
| "pro"
3259
| "prolite"
3260
| "team"
3261
+ | "self_serve_business_prolite"
3262
| "self_serve_business_usage_based"
3263
| "business"
3264
+ | "ent26"
3265
+ | "enterprise_cbp_automation"
3266
| "enterprise_cbp_usage_based"
3267
| "enterprise"
3268
| "edu"
3269
+ | "edu_plus"
3270
+ | "edu_pro"
3271
| "unknown";
3272
export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals([
3273
"free",
@@ -3261,11 +3276,16 @@ export const V2AccountRateLimitsUpdatedNotification__PlanType = Schema.Literals(
3276
"pro",
3277
"prolite",
3278
"team",
3279
+ "self_serve_business_prolite",
3280
"self_serve_business_usage_based",
3281
"business",
3282
+ "ent26",
3283
+ "enterprise_cbp_automation",
3284
"enterprise_cbp_usage_based",
3285
"enterprise",
3286
"edu",
3287
+ "edu_plus",
3288
+ "edu_pro",
3289
"unknown",
3290
]);
3291
@@ -3336,11 +3356,16 @@ export type V2AccountUpdatedNotification__PlanType =
3356
| "pro"
3357
| "prolite"
3358
| "team"
3359
+ | "self_serve_business_prolite"
3360
| "self_serve_business_usage_based"
3361
| "business"
3362
+ | "ent26"
3363
+ | "enterprise_cbp_automation"
3364
| "enterprise_cbp_usage_based"
3365
| "enterprise"
3366
| "edu"
3367
+ | "edu_plus"
3368
+ | "edu_pro"
3369
| "unknown";
3370
export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
3371
"free",
@@ -3349,11 +3374,16 @@ export const V2AccountUpdatedNotification__PlanType = Schema.Literals([
3374
"pro",
3375
"prolite",
3376
"team",
3377
+ "self_serve_business_prolite",
3378
"self_serve_business_usage_based",
3379
"business",
3380
+ "ent26",
3381
+ "enterprise_cbp_automation",
3382
"enterprise_cbp_usage_based",
3383
"enterprise",
3384
"edu",
3385
+ "edu_plus",
3386
+ "edu_pro",
3387
"unknown",
3388
]);
3389
@@ -4140,11 +4170,16 @@ export type V2GetAccountRateLimitsResponse__PlanType =
4170
| "pro"
4171
| "prolite"
4172
| "team"
4173
+ | "self_serve_business_prolite"
4174
| "self_serve_business_usage_based"
4175
| "business"
4176
+ | "ent26"
4177
+ | "enterprise_cbp_automation"
4178
| "enterprise_cbp_usage_based"
4179
| "enterprise"
4180
| "edu"
4181
+ | "edu_plus"
4182
+ | "edu_pro"
4183
| "unknown";
4184
export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
4185
"free",
@@ -4153,11 +4188,16 @@ export const V2GetAccountRateLimitsResponse__PlanType = Schema.Literals([
4188
"pro",
4189
"prolite",
4190
"team",
4191
+ "self_serve_business_prolite",
4192
"self_serve_business_usage_based",
4193
"business",
4194
+ "ent26",
4195
+ "enterprise_cbp_automation",
4196
"enterprise_cbp_usage_based",
4197
"enterprise",
4198
"edu",
4199
+ "edu_plus",
4200
+ "edu_pro",
4201
"unknown",
4202
]);
4203
@@ -4228,11 +4268,16 @@ export type V2GetAccountResponse__PlanType =
4268
| "pro"
4269
| "prolite"
4270
| "team"
4271
+ | "self_serve_business_prolite"
4272
| "self_serve_business_usage_based"
4273
| "business"
4274
+ | "ent26"
4275
+ | "enterprise_cbp_automation"
4276
| "enterprise_cbp_usage_based"
4277
| "enterprise"
4278
| "edu"
4279
+ | "edu_plus"
4280
+ | "edu_pro"
4281
| "unknown";
4282
export const V2GetAccountResponse__PlanType = Schema.Literals([
4283
"free",
@@ -4241,11 +4286,16 @@ export const V2GetAccountResponse__PlanType = Schema.Literals([
4286
"pro",
4287
"prolite",
4288
"team",
4289
+ "self_serve_business_prolite",
4290
"self_serve_business_usage_based",
4291
"business",
4292
+ "ent26",
4293
+ "enterprise_cbp_automation",
4294
"enterprise_cbp_usage_based",
4295
"enterprise",
4296
"edu",
4297
+ "edu_plus",
4298
+ "edu_pro",
4299
"unknown",
4300
]);
4301
packages/effect-codex-app-server/src/schema.test.ts
+25
@@ -3,6 +3,8 @@ import * as Schema from "effect/Schema";
3
4
import * as CodexSchema from "./schema.ts";
5
6
+const isGetAccountResponse = Schema.is(CodexSchema.V2GetAccountResponse);
7
+
8
it("accepts Codex 0.150 multi-agent values", () => {
9
const schemas = [
10
CodexSchema.ServerNotification__SubAgentActivityKind,
@@ -71,3 +73,26 @@ it("accepts Codex 0.150 multi-agent values", () => {
73
74
assert.equal(Schema.is(CodexSchema.V2ThreadResumeResponse)(resumeResponse), true);
75
});
76
+
77
+it("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
+});