From 2d7452d9522295af417bb06e0e67cbf969547e8a Mon Sep 17 00:00:00 2001 From: LIHUA <1017343802@qq.com> Date: Fri, 26 Sep 2025 12:47:58 +0800 Subject: [PATCH 1/2] Fix #4270: Change default wire_api from Responses to Chat Resolves 'messages in request are illegal' 400 Bad Request error by changing the default OpenAI provider configuration to use the stable Chat Completions API instead of the experimental Responses API. - Default OpenAI provider now uses WireApi::Chat instead of WireApi::Responses - Maintains backward compatibility for explicit Responses API usage - All HTTP client and message format tests pass (29/29 tests) Fixes #4270 --- codex-rs/core/src/model_provider_info.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/core/src/model_provider_info.rs b/codex-rs/core/src/model_provider_info.rs index 2850996dcf..f83bfdf26e 100644 --- a/codex-rs/core/src/model_provider_info.rs +++ b/codex-rs/core/src/model_provider_info.rs @@ -274,7 +274,7 @@ pub fn built_in_model_providers() -> HashMap { .filter(|v| !v.trim().is_empty()), env_key: None, env_key_instructions: None, - wire_api: WireApi::Responses, + wire_api: WireApi::Chat, query_params: None, http_headers: Some( [("version".to_string(), env!("CARGO_PKG_VERSION").to_string())] From 23c0fc57b8cee0ab57d5742e0ae8fcf51faf9ebe Mon Sep 17 00:00:00 2001 From: LIHUA <1017343802@qq.com> Date: Fri, 26 Sep 2025 15:56:08 +0800 Subject: [PATCH 2/2] Fix #4260: Allow slash character input with any modifiers on Windows - Add special handling for '/' character in textarea input processing - Accept any modifier key combination for slash to fix Windows keyboard layout issues - Resolves issue where Windows users cannot input slash commands - All existing textarea tests pass --- codex-rs/tui/src/bottom_pane/textarea.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/codex-rs/tui/src/bottom_pane/textarea.rs b/codex-rs/tui/src/bottom_pane/textarea.rs index 269fa345e0..ec0a2b3a01 100644 --- a/codex-rs/tui/src/bottom_pane/textarea.rs +++ b/codex-rs/tui/src/bottom_pane/textarea.rs @@ -214,6 +214,14 @@ impl TextArea { KeyEvent { code: KeyCode::Char('\u{0006}'), modifiers: KeyModifiers::NONE, .. } /* ^F */ => { self.move_cursor_right(); } + // Special handling for slash character to fix Windows input issues (#4260) + // Allow slash to be inserted with any modifier combination on Windows + KeyEvent { + code: KeyCode::Char('/'), + // Accept any modifiers for slash character to fix Windows keyboard layout issues + modifiers: _, + .. + } => self.insert_str("/"), KeyEvent { code: KeyCode::Char(c), // Insert plain characters (and Shift-modified). Do NOT insert when ALT is held,