Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Update limit_remaining Immediately When current_limit Changes #744

Open
ghouse97 opened this issue Oct 23, 2024 · 1 comment

Comments

@ghouse97
Copy link

When the current_limit is updated, we can see the new current_limit value in the response. However, the limit_remaining value is not updated immediately to reflect this change. Instead, it remains unchanged and only gets updated after the reset of the current window.

Problem: For example, let's say we have a rate limit window from 10:00 AM to 11:00 AM with an initial current_limit of 10,000 requests per hour. If the limit_remaining reaches 0 by 10:15 AM and we subsequently increase the current_limit to 15,000, we can see the updated current_limit in the response. However, the limit_remaining value remains 0 until the window resets at 11:00 AM. This behavior doesn't reflect the updated limit in real time, which could be misleading.

Proposed Solution: It would be more intuitive and useful if the limit_remaining value were updated immediately when the current_limit changes. In the example above, after increasing the current_limit to 15,000, the limit_remaining should update to 5,000, reflecting the available requests left in the current window.

This change would ensure that the response data remains consistent and accurately represents the state of the rate limit at any given time.

@superaghu
Copy link

Can this be prioritized, as we are also seeing this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants