From 8cd04aa76bc6bb1443d1ea3d0afca3651a1217a3 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Wed, 25 Mar 2026 14:07:16 +0100 Subject: [PATCH] Always pass --model to cursor-agent CLI (#8106) Signed-off-by: Vincenzo Palazzo Signed-off-by: goose Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: Douwe Osinga --- crates/goose/src/providers/cursor_agent.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/goose/src/providers/cursor_agent.rs b/crates/goose/src/providers/cursor_agent.rs index ceb25776..b9ef06e1 100644 --- a/crates/goose/src/providers/cursor_agent.rs +++ b/crates/goose/src/providers/cursor_agent.rs @@ -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)