mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
## Why Supported clients currently receive only a reset-credit count from `account/rateLimits/read`. The redemption UI and other app-server clients need each available credit's expiry and ID so they can explain what will expire and consume the credit a user selected. This information belongs on the existing rate-limit read surface rather than a second app-server list RPC that clients would need to coordinate. ## What changed - extend `rateLimitResetCredits` on `account/rateLimits/read` with nullable `credits` detail rows - fetch usage and reset-credit details concurrently; if the detail request fails, times out, or cannot be parsed, preserve the usage response and return `credits: null` - expose each credit's ID, reset type, status, grant time, expiry time, title, and description - add an optional nullable `creditId` to `account/rateLimitResetCredit/consume`; omitting it preserves the existing automatic-selection behavior - forward a selected credit ID to the Codex backend and update the app-server documentation and generated schemas The TUI consumer is stacked in #30488. ## Validation - `just test -p codex-app-server-protocol` (251 passed) - `just test -p codex-backend-client` (16 passed) - `just test -p codex-app-server rate_limit` (18 passed) Part of #29618.
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
mod client;
|
|
pub(crate) mod types;
|
|
|
|
pub use client::AddCreditsNudgeCreditType;
|
|
pub use client::Client;
|
|
pub use client::RequestError;
|
|
pub use types::AccountEntry;
|
|
pub use types::AccountsCheckResponse;
|
|
pub use types::CodeTaskDetailsResponse;
|
|
pub use types::CodeTaskDetailsResponseExt;
|
|
pub use types::CodexWorkspaceMessage;
|
|
pub use types::CodexWorkspaceMessageType;
|
|
pub use types::CodexWorkspaceMessagesResponse;
|
|
pub use types::ConfigBundleResponse;
|
|
pub use types::ConsumeRateLimitResetCreditCode;
|
|
pub use types::ConsumeRateLimitResetCreditResponse;
|
|
pub use types::DeliveredConfigToml;
|
|
pub use types::DeliveredRequirementsToml;
|
|
pub use types::DeliveredTomlFragment;
|
|
pub use types::PaginatedListTaskListItem;
|
|
pub use types::RateLimitResetCreditDetails;
|
|
pub use types::RateLimitResetCreditsDetails;
|
|
pub use types::RateLimitResetCreditsSummary;
|
|
pub use types::RateLimitsWithResetCredits;
|
|
pub use types::TaskListItem;
|
|
pub use types::TokenUsageProfile;
|
|
pub use types::TokenUsageProfileDailyBucket;
|
|
pub use types::TokenUsageProfileStats;
|
|
pub use types::TurnAttemptsSiblingTurnsResponse;
|