From 32c7f6806a953b55a28aee0283fbf23b34dbc0ef Mon Sep 17 00:00:00 2001 From: Sayan Sisodiya Date: Tue, 10 Feb 2026 21:50:47 -0800 Subject: [PATCH] clear model_messages on base_instructions --- codex-rs/core/src/models_manager/model_info.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex-rs/core/src/models_manager/model_info.rs b/codex-rs/core/src/models_manager/model_info.rs index 9f4a1a4205..7da84b3183 100644 --- a/codex-rs/core/src/models_manager/model_info.rs +++ b/codex-rs/core/src/models_manager/model_info.rs @@ -59,6 +59,9 @@ pub(crate) fn with_model_info_patch( } if let Some(base_instructions) = &model_info_patch.base_instructions { model.base_instructions = base_instructions.clone(); + // Keep parity with top-level config behavior: explicit base instructions + // should disable template-driven model messages unless the patch sets them again. + model.model_messages = None; } if let Some(model_messages) = &model_info_patch.model_messages { model.model_messages = Some(model_messages.clone());