Use int timestamps for rate limit reset_at (#5383)

The backend will be returning unix timestamps (seconds since epoch)
instead of RFC 3339 strings. This will make it more ergonomic for
developers to integrate against - no string parsing.
This commit is contained in:
Owen Lin
2025-10-20 12:26:46 -07:00
committed by GitHub
parent 8044b55335
commit c84fc83222
6 changed files with 33 additions and 28 deletions

View File

@@ -658,9 +658,9 @@ pub struct RateLimitWindow {
/// Rolling window duration, in minutes.
#[ts(type = "number | null")]
pub window_minutes: Option<i64>,
/// Timestamp (RFC3339) when the window resets.
#[ts(type = "string | null")]
pub resets_at: Option<String>,
/// Unix timestamp (seconds since epoch) when the window resets.
#[ts(type = "number | null")]
pub resets_at: Option<i64>,
}
// Includes prompts, tools and space to call compact.