Repository navigation
feat(dashboard): make Codex quota card windows reflect reality - #8054
Merged
diegosouzapw merged 1 commit intoJul 22, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
Two accuracy problems in buildCodexUsageQuotas (open-sse/services/codexUsageQuotas.ts): 1. ChatGPT Codex's /wham/usage advertises a latent per-feature ceiling for the spark feature (metered_feature codex_bengalfox) to accounts by default. A never-used bucket is unanchored (used_percent 0, reset_after_seconds == limit_window_seconds), so it recomputes its reset as now + full_window on every fetch and was rendered as a permanent GPT-5.3-Codex-Spark row at 100% for a model the operator never used. Skip latent windows (isLatentWindow); they reappear once the feature is actually used. The label now comes from the payload's own limit_name, falling back to the constant. 2. primary_window/secondary_window were labeled session/weekly purely by position, ignoring limit_window_seconds, so a 7-day primary_window showed 'Session'. The session/weekly keys (routing semantics) stay unchanged; only the display label is corrected from the real window duration (windowDurationLabel), so a 7-day window shows 'Weekly'. Fixes cheaper-inference#8051.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
2 tasks done
diegosouzapw
merged commit Jul 22, 2026
1a07646
into
cheaper-inference:release/v3.8.49
5 checks passed
Collaborator
|
Obrigado, @insoln — mergeado na |
This was referenced Jul 23, 2026
Merged
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…er-inference#8054) Two accuracy problems in buildCodexUsageQuotas (open-sse/services/codexUsageQuotas.ts): 1. ChatGPT Codex's /wham/usage advertises a latent per-feature ceiling for the spark feature (metered_feature codex_bengalfox) to accounts by default. A never-used bucket is unanchored (used_percent 0, reset_after_seconds == limit_window_seconds), so it recomputes its reset as now + full_window on every fetch and was rendered as a permanent GPT-5.3-Codex-Spark row at 100% for a model the operator never used. Skip latent windows (isLatentWindow); they reappear once the feature is actually used. The label now comes from the payload's own limit_name, falling back to the constant. 2. primary_window/secondary_window were labeled session/weekly purely by position, ignoring limit_window_seconds, so a 7-day primary_window showed 'Session'. The session/weekly keys (routing semantics) stay unchanged; only the display label is corrected from the real window duration (windowDurationLabel), so a 7-day window shows 'Weekly'. Fixes cheaper-inference#8051.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…er-inference#8054) Two accuracy problems in buildCodexUsageQuotas (open-sse/services/codexUsageQuotas.ts): 1. ChatGPT Codex's /wham/usage advertises a latent per-feature ceiling for the spark feature (metered_feature codex_bengalfox) to accounts by default. A never-used bucket is unanchored (used_percent 0, reset_after_seconds == limit_window_seconds), so it recomputes its reset as now + full_window on every fetch and was rendered as a permanent GPT-5.3-Codex-Spark row at 100% for a model the operator never used. Skip latent windows (isLatentWindow); they reappear once the feature is actually used. The label now comes from the payload's own limit_name, falling back to the constant. 2. primary_window/secondary_window were labeled session/weekly purely by position, ignoring limit_window_seconds, so a 7-day primary_window showed 'Session'. The session/weekly keys (routing semantics) stay unchanged; only the display label is corrected from the real window duration (windowDurationLabel), so a 7-day window shows 'Weekly'. Fixes cheaper-inference#8051.
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.
Fixes #8051
Two accuracy problems in the Codex quota card, both in
buildCodexUsageQuotas(open-sse/services/codexUsageQuotas.ts).1. Latent, never-used per-feature windows shown as permanent noise
ChatGPT Codex's
/wham/usageadvertises a latent per-feature ceiling for the spark feature (metered_feature: "codex_bengalfox") to accounts by default. For a never-used bucket the window is unanchored —used_percent: 0andreset_after_seconds == limit_window_seconds— so it recomputes its reset asnow + full_windowon every fetch. It was rendered as a permanentGPT-5.3-Codex-Sparkrow at 100% whose reset "snaps to exactly 7 days" on every refresh, for a model the operator never used (ChatGPT's own UI doesn't show it).Fix: skip latent spark windows (
isLatentWindow:used_percent === 0and a full-windowreset_after_seconds); they reappear once the feature is actually used. The display name now comes from the payload's ownlimit_name(falling back to the constant), so it tracks whatever OpenAI reports instead of a hardcoded version.2. Window labels ignored the real window duration
primary_window → "session"/secondary_window → "weekly"were assigned purely by position, never readinglimit_window_seconds. On a Pro account whoseprimary_windowis a 7-day window (limit_window_seconds: 604800) with no secondary, the card labeled it "Session".Fix: the internal
session/weeklykeys (routing semantics — combo quota scoring, preflight, cooldowns) are unchanged; only the display label is corrected fromlimit_window_seconds(windowDurationLabel), so a 7-dayprimary_windowshows "Weekly". Genuine 5h windows keep the default label.Testing
tests/unit/codex-usage-quotas-latent-window.test.ts(5 cases): latent spark window omitted; used spark window shown; display name from payloadlimit_namewith constant fallback; 7-day primary labeled "Weekly"; genuine 5h/7d windows keep defaults.codex-banked-reset-credits-5199+codex-usage-quotas-review-windowpass (12/12, no regressions).npm run typecheck:coreand ESLint clean.