mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Extend rate limit reads with usage capabilities (#42358)
## What changed - Accept optional `account/rateLimits/read` capabilities for Luna Reserve support and lightweight background polling while preserving omitted and `null` params. - Forward the Luna Reserve capability only for eligible ChatGPT sessions, and let lightweight polls skip the separate reset-credit detail request. - Return the backend's `ordinaryUsageAllowed` decision only when its account and user identity match the active session. ## Testing - Cover capability defaults, eligible and restricted authentication modes, lightweight polling, identity filtering, and backend permission handling. GitOrigin-RevId: f407a3ae1e70e411fdf245f072a16e453f59cd87
This commit is contained in:
1 parent
0227158fd5
commit
577a4fcd06
26 files changed
+459
-28
No files matched your search
@@ -2503,6 +2503,7 @@ mod tests {
|
||||
#[test]
|
||||
fn app_server_rate_limit_snapshots_deduplicates_top_level_limit_from_map() {
|
||||
let response = GetAccountRateLimitsResponse {
|
||||
ordinary_usage_allowed: None,
|
||||
account_id: None,
|
||||
rate_limit_upsell: None,
|
||||
rate_limits: rate_limit_snapshot("codex"),
|
||||
|
||||
Reference in new issue
Block a user