From 024118625ef5a26f6e787b7989bbd20746cf2fcd Mon Sep 17 00:00:00 2001 From: pakrym-oai Date: Tue, 5 May 2026 18:57:17 -0700 Subject: [PATCH] [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` --- codex-rs/protocol/src/protocol.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rs index ab294ab157..bce929d214 100644 --- a/codex-rs/protocol/src/protocol.rs +++ b/codex-rs/protocol/src/protocol.rs @@ -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", } } }