Skip to content

fix#4251

Merged
aibrahim-oai merged 4 commits intomainfrom
status
Sep 25, 2025
Merged

fix#4251
aibrahim-oai merged 4 commits intomainfrom
status

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.

used_percent,
window_minutes: parse_header_u64(headers, window_minutes_header),
resets_in_seconds: parse_header_u64(headers, resets_header),
used_percent.and_then(|used_percent| {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why so complicated? why not parse all 3 into variables and then have

match (used_percent, window_minutes, resets_in_seconds) =>
(Some, some, some) => Some()
=> None

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We send the headers as 0 when limits aren't set.

@aibrahim-oai aibrahim-oai merged commit 7355ca4 into main Sep 25, 2025
19 checks passed
@aibrahim-oai aibrahim-oai deleted the status branch September 25, 2025 22:12
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants