Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(usage): keep same-email Codex subscriptions apart when their plans differ #10845

Closedtan7vir(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/10845/headopened View on GitHub

Showing 3 changed files with 131 additions and 1 deletion (loading 1).

x
0 of 3 viewed, 3 left
3 additions and 1 deletionapps/server/src/usage/cliproxyApi.tsModified
View file
@@ -221,9 +221,11 @@
: [],
+ // The OAuth usage read carries no subscription tier, and the pooled
+ // views treat a plan label as part of the account's identity, so the
+ // hub claims none rather than a placeholder a native tier would not match.
return {
...base,
- plan: "Claude Subscription",
usageLimits: claudeUsageResponseToLimits({
checkedAt,
response: {
128 additions and 0 deletionspackages/shared/src/usageLimits.test.tsModified
View file
@@ -238,6 +238,18 @@
).toEqual(accounts);
});
​
+ it("does not hide a hub account whose plan differs from the native subscription", () => {
+ const plusNative = {
+ ...native,
+ auth: { ...native.auth, label: "ChatGPT Plus Subscription" },
+ };
+ const businessAccount = { ...account, plan: "ChatGPT Business Subscription" };
+​
+ expect(collectLimitSources(presentations([plusNative], [businessAccount]))).toMatchObject([
+ { accounts: [businessAccount], hiddenAccountCount: 0 },