[codex] Remove unused ListModels op (#21276)

## Why

The core protocol still exposed a `ListModels` submission op even though
no client sends it and the core submission loop treated it as an ignored
unknown op. Keeping the dead variant made the protocol surface look
supported while the active model listing API is the app-server
`model/list` JSON-RPC request.

## What Changed

- Removed the unused `Op::ListModels` variant from `codex-rs/protocol`.
- Removed its `Op::kind()` mapping.

The existing app-server `model/list` endpoint is unchanged.

## Verification

- `cargo test -p codex-protocol`
This commit is contained in:
pakrym-oai
2026-05-05 18:57:17 -07:00
committed by GitHub
parent a736cb55a2
commit 024118625e

View File

@@ -796,9 +796,6 @@ pub enum Op {
/// The raw command string after '!'
command: String,
},
/// Request the list of available models.
ListModels,
}
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq, JsonSchema)]
@@ -904,7 +901,6 @@ impl Op {
Self::ApproveGuardianDeniedAction { .. } => "approve_guardian_denied_action",
Self::Shutdown => "shutdown",
Self::RunUserShellCommand { .. } => "run_user_shell_command",
Self::ListModels => "list_models",
}
}
}