fix(codex-api): treat invalid_prompt as non-retryable (#9400)

**Goal**: Prevent response.failed events with `invalid_prompt` from
being treated as retryable errors so the UI shows the actual error
message instead of continually retrying.

**Before**: Codex would continue to retry despite the prompt being
marked as disallowed
**After**: Codex will stop retrying once prompt is marked disallowed
This commit is contained in:
Fouad Matin
2026-01-16 22:22:08 -08:00
committed by GitHub
parent 146d54cede
commit 93a5e0fe1c
3 changed files with 33 additions and 0 deletions

View File

@@ -25,6 +25,8 @@ pub enum ApiError {
},
#[error("rate limit: {0}")]
RateLimit(String),
#[error("invalid request: {message}")]
InvalidRequest { message: String },
}
impl From<RateLimitError> for ApiError {