mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] rename rollout budget error to session budget error (#29744)
## Summary - rename the rollout-budget exhaustion error from `RolloutBudgetExceeded` to `SessionBudgetExceeded` - expose the matching app-server v2 wire value as `sessionBudgetExceeded` - regenerate JSON/TypeScript schema fixtures and update the app-server docs and focused tests This is a naming-only follow-up to #29715 based on [Pavel's review suggestion](https://github.com/openai/codex/pull/29715#discussion_r3463183480). Runtime behavior is unchanged. ## Tests - `just test -p codex-core rollout_budget` - `just test -p codex-app-server-protocol` - `just fmt` - `just write-app-server-schema`
This commit is contained in:
committed by
GitHub
Unverified
parent
77e7ce1374
commit
1ec3def0b5
@@ -70,7 +70,7 @@ pub enum CodexErr {
|
||||
TurnAborted,
|
||||
|
||||
#[error("shared rollout token budget exhausted")]
|
||||
RolloutBudgetExceeded,
|
||||
SessionBudgetExceeded,
|
||||
|
||||
/// Returned by ResponsesClient when the SSE stream disconnects or errors out **after** the HTTP
|
||||
/// handshake has succeeded but **before** it finished emitting `response.completed`.
|
||||
@@ -176,7 +176,7 @@ impl CodexErr {
|
||||
pub fn is_retryable(&self) -> bool {
|
||||
match self {
|
||||
CodexErr::TurnAborted
|
||||
| CodexErr::RolloutBudgetExceeded
|
||||
| CodexErr::SessionBudgetExceeded
|
||||
| CodexErr::Interrupted
|
||||
| CodexErr::EnvVar(_)
|
||||
| CodexErr::Fatal(_)
|
||||
@@ -224,7 +224,7 @@ impl CodexErr {
|
||||
pub fn to_codex_protocol_error(&self) -> CodexErrorInfo {
|
||||
match self {
|
||||
CodexErr::ContextWindowExceeded => CodexErrorInfo::ContextWindowExceeded,
|
||||
CodexErr::RolloutBudgetExceeded => CodexErrorInfo::RolloutBudgetExceeded,
|
||||
CodexErr::SessionBudgetExceeded => CodexErrorInfo::SessionBudgetExceeded,
|
||||
CodexErr::UsageLimitReached(_)
|
||||
| CodexErr::QuotaExceeded
|
||||
| CodexErr::UsageNotIncluded => CodexErrorInfo::UsageLimitExceeded,
|
||||
|
||||
@@ -1690,7 +1690,7 @@ pub enum NonSteerableTurnKind {
|
||||
#[ts(rename_all = "snake_case")]
|
||||
pub enum CodexErrorInfo {
|
||||
ContextWindowExceeded,
|
||||
RolloutBudgetExceeded,
|
||||
SessionBudgetExceeded,
|
||||
UsageLimitExceeded,
|
||||
ServerOverloaded,
|
||||
CyberPolicy,
|
||||
@@ -1728,7 +1728,7 @@ impl CodexErrorInfo {
|
||||
match self {
|
||||
Self::ThreadRollbackFailed | Self::ActiveTurnNotSteerable { .. } => false,
|
||||
Self::ContextWindowExceeded
|
||||
| Self::RolloutBudgetExceeded
|
||||
| Self::SessionBudgetExceeded
|
||||
| Self::UsageLimitExceeded
|
||||
| Self::ServerOverloaded
|
||||
| Self::CyberPolicy
|
||||
|
||||
Reference in New Issue
Block a user