From c20313283285a30e3f761b21c5b4dc296724a22c Mon Sep 17 00:00:00 2001 From: hechibing Date: Mon, 16 Feb 2026 16:59:55 +0800 Subject: [PATCH 1/2] fix(agent): support utf-16 prompt.md for json agents --- src/cortex-cli/src/agent_cmd/loader.rs | 5 +++- src/cortex-cli/src/agent_cmd/tests.rs | 38 ++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/cortex-cli/src/agent_cmd/loader.rs b/src/cortex-cli/src/agent_cmd/loader.rs index 86caca9..65dd143 100644 --- a/src/cortex-cli/src/agent_cmd/loader.rs +++ b/src/cortex-cli/src/agent_cmd/loader.rs @@ -413,7 +413,10 @@ pub fn load_agent_from_json(path: &Path, source: AgentSource) -> Result Date: Mon, 16 Feb 2026 17:02:21 +0800 Subject: [PATCH 2/2] fix(stats): map qwen models to alibaba provider --- src/cortex-cli/src/stats_cmd.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cortex-cli/src/stats_cmd.rs b/src/cortex-cli/src/stats_cmd.rs index 1e40750..9992bbd 100644 --- a/src/cortex-cli/src/stats_cmd.rs +++ b/src/cortex-cli/src/stats_cmd.rs @@ -323,7 +323,7 @@ fn infer_provider(model: &str) -> String { } else if model_lower.contains("grok") { "xai".to_string() } else if model_lower.contains("qwen") { - "deepseek".to_string() // Qwen models often available via DeepSeek + "alibaba".to_string() } else { "unknown".to_string() } @@ -722,6 +722,7 @@ mod tests { assert_eq!(infer_provider("gpt-4o"), "openai"); assert_eq!(infer_provider("gemini-2.0-flash"), "google"); assert_eq!(infer_provider("deepseek-chat"), "deepseek"); + assert_eq!(infer_provider("qwen2.5-coder"), "alibaba"); } #[test]