Always pass --model to cursor-agent CLI (#8106)

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Signed-off-by: goose <goose@block.xyz>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Vincenzo Palazzo
2026-03-25 14:07:16 +01:00
committed by GitHub
parent a47add0a83
commit 8cd04aa76b
+2 -5
View File
@@ -23,7 +23,7 @@ use rmcp::model::Tool;
const CURSOR_AGENT_PROVIDER_NAME: &str = "cursor-agent";
pub const CURSOR_AGENT_DEFAULT_MODEL: &str = "auto";
pub const CURSOR_AGENT_KNOWN_MODELS: &[&str] = &["auto", "gpt-5", "opus-4.1", "sonnet-4"];
pub const CURSOR_AGENT_KNOWN_MODELS: &[&str] = &["auto", "composer-2", "composer-2-fast"];
pub const CURSOR_AGENT_DOC_URL: &str = "https://docs.cursor.com/en/cli/overview";
@@ -205,10 +205,7 @@ impl CursorAgentProvider {
cmd.env("PATH", path);
}
// Only pass model parameter if it's in the known models list
if CURSOR_AGENT_KNOWN_MODELS.contains(&self.model.model_name.as_str()) {
cmd.arg("--model").arg(&self.model.model_name);
}
cmd.arg("--model").arg(&self.model.model_name);
cmd.arg("-p")
.arg(&prompt)