fix(codex): treat expired subscriptions as free - #1986
Open
Jonesxq wants to merge 1 commit into
Open
Conversation
Jonesxq
marked this pull request as ready for review
August 18, 2026 15:47
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plan_type和subscription_active_until计算 Codex 账号的有效套餐,启动时就把已过期的 Plus/Pro 账号显示并分组为 FREE。Root cause
应用启动时读取的账号缓存仍保留原始付费
plan_type,而标签、筛选分组和本地 API 服务限制直接使用该字段。手动刷新订阅后数据才被更新,所以首次打开会暂时显示 PLUS。Validation
node --test --test-isolation=none --test-concurrency=1 src/types/codex.test.ts src/utils/codexLocalAccessAccounts.test.ts src/utils/codexApiKeyAccountScope.test.ts(19/19)npm run typechecknpm run buildRelated
Fixes #1895
Related to #1907; this branch is rebased on the current v1.3.22
mainso the fix can be reviewed against the latest code.