fix: switch rate limit reset handling to timestamps (#5304)
This change ensures that we store the absolute time instead of relative offsets of when the primary and secondary rate limits will reset. Previously these got recalculated relative to current time, which leads to the displayed reset times to change over time, including after doing a codex resume. For previously changed sessions, this will cause the reset times to not show due to this being a breaking change: <img width="524" height="55" alt="Screenshot 2025-10-17 at 5 14 18 PM" src="https://github.com/user-attachments/assets/53ebd43e-da25-4fef-9c47-94a529d40265" /> Fixes https://github.com/openai/codex/issues/4761
This commit is contained in:
committed by
GitHub
parent
41900e9d0f
commit
0e08dd6055
@@ -644,9 +644,9 @@ pub struct RateLimitWindow {
|
||||
/// Rolling window duration, in minutes.
|
||||
#[ts(type = "number | null")]
|
||||
pub window_minutes: Option<u64>,
|
||||
/// Seconds until the window resets.
|
||||
#[ts(type = "number | null")]
|
||||
pub resets_in_seconds: Option<u64>,
|
||||
/// Timestamp (RFC3339) when the window resets.
|
||||
#[ts(type = "string | null")]
|
||||
pub resets_at: Option<String>,
|
||||
}
|
||||
|
||||
// Includes prompts, tools and space to call compact.
|
||||
|
||||
Reference in New Issue
Block a user