Open ghouse97 opened 1 month ago
Can this be prioritized, as we are also seeing this same issue.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
When the
current_limit
is updated, we can see the newcurrent_limit
value in the response. However, thelimit_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 thelimit_remaining
reaches 0 by 10:15 AM and we subsequently increase thecurrent_limit
to 15,000, we can see the updatedcurrent_limit
in the response. However, thelimit_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 thecurrent_limit
changes. In the example above, after increasing thecurrent_limit
to 15,000, thelimit_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.