Auto: address issue #141 - Use Qwen-coder in /plan (and other shortcuts)

This commit is contained in:
just-every-code
2025-09-13 09:56:41 +00:00
parent 5e96511cfd
commit d1272d5ede
4 changed files with 18 additions and 2 deletions
+15 -2
View File
@@ -612,6 +612,14 @@ async fn execute_model_with_permissions(
cmd.args(&["-m", "gemini-2.5-pro", "-y", "-p", prompt]);
}
}
"qwen" => {
// Qwen coder: follow Gemini CLI UX, but do not pin a model.
if read_only {
cmd.args(&["-p", prompt]);
} else {
cmd.args(&["-y", "-p", prompt]);
}
}
"codex" | "code" => {
if read_only {
cmd.args(&["-s", "read-only", "-a", "never", "exec", "--skip-git-repo-check", prompt]);
@@ -716,6 +724,11 @@ async fn execute_model_with_permissions(
if !read_only { args.push("-y".to_string()); }
args.extend(["-p".to_string(), prompt.to_string()]);
}
"qwen" => {
// Do not specify a model to allow latest default.
if !read_only { args.push("-y".to_string()); }
args.extend(["-p".to_string(), prompt.to_string()]);
}
"codex" | "code" => {
args.extend(["-s".to_string(), if read_only { "read-only" } else { "workspace-write" }.to_string()]);
args.extend(["-a".to_string(), "never".to_string(), "exec".to_string(), "--skip-git-repo-check".to_string(), prompt.to_string()]);
@@ -810,8 +823,8 @@ pub fn create_run_agent_tool() -> OpenAiTool {
properties.insert(
"model".to_string(),
JsonSchema::String {
description: Some(
"Model: 'claude', 'gemini', or 'code' (or array of models for batch execution)"
description: Some(
"Model: 'claude', 'gemini', 'qwen', or 'code' (or array of models for batch execution)"
.to_string(),
),
},
+1
View File
@@ -3941,6 +3941,7 @@ async fn handle_run_agent(sess: &Session, ctx: &ToolCallCtx, arguments: String)
// External CLIs expected to be in PATH
"claude" => ("claude".to_string(), false),
"gemini" => ("gemini".to_string(), false),
"qwen" => ("qwen".to_string(), false),
_ => (m, false),
}
}
+1
View File
@@ -19,6 +19,7 @@ fn get_default_models() -> Vec<String> {
vec![
"claude".to_string(),
"gemini".to_string(),
"qwen".to_string(),
"codex".to_string(),
]
}
+1
View File
@@ -4197,6 +4197,7 @@ impl ChatWidget<'_> {
} else {
to_check.push(("claude".to_string(), "claude".to_string(), false));
to_check.push(("gemini".to_string(), "gemini".to_string(), false));
to_check.push(("qwen".to_string(), "qwen".to_string(), false));
to_check.push(("code".to_string(), "code".to_string(), true));
}