Fix OpenAI quota window classification#11
Merged
thibautrey merged 1 commit intoJul 20, 2026
Merged
Conversation
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.
OpenAI has suspended 5h window quotas, this causes the UI to misbehave by displaying the weekly quota in the 5h columns because this is now the "primary" one.
https://www.reddit.com/r/OpenAI/comments/1uuqhmk/if_you_noticed_that_in_codex_you_no_longer_a_see/
What changed
primary_windowandsecondary_windowpositions.Why
OpenAI currently returns the seven-day quota as
primary_windowwhen the temporary five-hour limit is absent, withsecondary_windowset tonull. The proxy previously assumed thatprimary_windowalways meant five hours and consequently displayed the weekly percentage in the five-hour column.Classifying by
limit_window_secondscorrectly displays the weekly quota today and will automatically recognize the five-hour window if OpenAI restores it later.Impact
Quota percentages and reset times are assigned to the correct normalized five-hour or weekly window. Routing continues to consume the same normalized fields.
Validation
docker compose build multivibegit diff --check