mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
progress
This commit is contained in:
@@ -67,6 +67,11 @@ pub(crate) fn map_api_error(err: ApiError) -> CodexErr {
|
||||
status,
|
||||
request_id: extract_request_id(headers.as_ref()),
|
||||
})
|
||||
} else if status == http::StatusCode::PRECONDITION_FAILED
|
||||
&& body_text
|
||||
.contains("Models catalog has changed. Please refresh your models list.")
|
||||
{
|
||||
CodexErr::OutdatedModels
|
||||
} else {
|
||||
CodexErr::UnexpectedStatus(UnexpectedResponseError {
|
||||
status,
|
||||
|
||||
@@ -90,6 +90,10 @@ pub enum CodexErr {
|
||||
#[error("spawn failed: child stdout/stderr not captured")]
|
||||
Spawn,
|
||||
|
||||
/// Returned when the models list is outdated and needs to be refreshed.
|
||||
#[error("remote models list is outdated")]
|
||||
OutdatedModels,
|
||||
|
||||
/// Returned by run_command_stream when the user pressed Ctrl‑C (SIGINT). Session uses this to
|
||||
/// surface a polite FunctionCallOutput back to the model instead of crashing the CLI.
|
||||
#[error("interrupted (Ctrl-C). Something went wrong? Hit `/feedback` to report the issue.")]
|
||||
|
||||
Reference in New Issue
Block a user