From 70a655cddb731912ef01e24954967f85753cbc08 Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Mon, 25 May 2026 18:51:05 -0500 Subject: [PATCH] test: use open model sentinels --- crates/tui/src/client.rs | 12 ++++++++---- crates/tui/src/client/chat.rs | 10 +++++----- crates/tui/src/config.rs | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/crates/tui/src/client.rs b/crates/tui/src/client.rs index 570b2762..21552a79 100644 --- a/crates/tui/src/client.rs +++ b/crates/tui/src/client.rs @@ -1289,7 +1289,7 @@ mod tests { // and DOES replay reasoning_content — see // `deepseek_model_on_openai_provider_still_replays_reasoning_content`. let request = MessageRequest { - model: "gpt-4o".to_string(), + model: "qwen3-coder".to_string(), messages: vec![Message { role: "assistant".to_string(), content: vec![ @@ -2748,7 +2748,7 @@ mod tests { // DeepSeek reasoning model on the openai provider still gets sanitized // (see chat.rs `deepseek_model_on_openai_provider_still_replays_*`). let mut body = json!({ - "model": "gpt-4o", + "model": "qwen3-coder", "messages": [ { "role": "user", "content": "hi" }, { @@ -2759,8 +2759,12 @@ mod tests { ] }); - let result = - sanitize_thinking_mode_messages(&mut body, "gpt-4o", Some("max"), ApiProvider::Openai); + let result = sanitize_thinking_mode_messages( + &mut body, + "qwen3-coder", + Some("max"), + ApiProvider::Openai, + ); assert!(result.is_none()); let assistant = body["messages"] diff --git a/crates/tui/src/client/chat.rs b/crates/tui/src/client/chat.rs index 1b691110..dd6c37a4 100644 --- a/crates/tui/src/client/chat.rs +++ b/crates/tui/src/client/chat.rs @@ -3093,7 +3093,7 @@ mod alias_thinking_detection_tests { // `reasoning_content` on providers that reject the field. assert!(!requires_reasoning_content("deepseek-v3")); assert!(!requires_reasoning_content("deepseek-coder")); - assert!(!requires_reasoning_content("gpt-4o")); + assert!(!requires_reasoning_content("qwen3-coder")); assert!(!requires_reasoning_content("claude-sonnet-4-6")); } @@ -3169,7 +3169,7 @@ mod alias_thinking_detection_tests { // openai provider must continue to have reasoning_content stripped. assert!(!should_replay_reasoning_content_for_provider( ApiProvider::Openai, - "gpt-4o", + "qwen3-coder", None, )); assert!(!should_replay_reasoning_content_for_provider( @@ -3211,7 +3211,7 @@ mod alias_thinking_detection_tests { // parser keeps inlining any `reasoning_content` it emits as text. assert!(!is_reasoning_model_for_stream( ApiProvider::Openai, - "gpt-4o" + "qwen3-coder" )); assert!(!is_reasoning_model_for_stream( ApiProvider::Openai, @@ -3220,7 +3220,7 @@ mod alias_thinking_detection_tests { // Non-DeepSeek model on a reasoning-aware provider is also unchanged. assert!(!is_reasoning_model_for_stream( ApiProvider::Deepseek, - "gpt-4o" + "qwen3-coder" )); } @@ -3230,7 +3230,7 @@ mod alias_thinking_detection_tests { // model identity, or stream parsing and message sanitisation disagree // about where reasoning tokens live. Effort=None isolates the // model/provider dimension shared by both. - for model in ["deepseek-v4-pro", "deepseek-reasoner", "gpt-4o"] { + for model in ["deepseek-v4-pro", "deepseek-reasoner", "qwen3-coder"] { for provider in [ApiProvider::Openai, ApiProvider::Deepseek] { assert_eq!( is_reasoning_model_for_stream(provider, model), diff --git a/crates/tui/src/config.rs b/crates/tui/src/config.rs index 7e93e9d7..ce15b29e 100644 --- a/crates/tui/src/config.rs +++ b/crates/tui/src/config.rs @@ -5243,7 +5243,7 @@ api_key = "old-openrouter-key" #[test] fn normalize_model_name_rejects_invalid_or_non_deepseek_ids() { - assert!(normalize_model_name("gpt-4o").is_none()); + assert!(normalize_model_name("qwen3-coder").is_none()); assert!(normalize_model_name("codewhale v4").is_none()); assert!(normalize_model_name("").is_none()); }