From 6357a2163547a7fef79e67986968f954405d606a Mon Sep 17 00:00:00 2001 From: Ramazan Sancar Date: Fri, 24 Oct 2025 22:48:00 +0000 Subject: [PATCH] feat(githubcopilot): add support for newer Copilot AI Models Signed-off-by: Ramazan Sancar --- crates/goose/src/providers/githubcopilot.rs | 26 ++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/crates/goose/src/providers/githubcopilot.rs b/crates/goose/src/providers/githubcopilot.rs index 4a822ee7abbe..f2b98e5b6983 100644 --- a/crates/goose/src/providers/githubcopilot.rs +++ b/crates/goose/src/providers/githubcopilot.rs @@ -24,17 +24,31 @@ use crate::model::ModelConfig; use crate::providers::base::ConfigKey; use rmcp::model::Tool; -pub const GITHUB_COPILOT_DEFAULT_MODEL: &str = "gpt-4o"; +pub const GITHUB_COPILOT_DEFAULT_MODEL: &str = "gpt-4.1"; pub const GITHUB_COPILOT_KNOWN_MODELS: &[&str] = &[ + "gpt-4.1", + "gpt-5-mini", + "gpt-5", "gpt-4o", - "o1", - "o3-mini", - "claude-3.7-sonnet", + "grok-code-fast-1", + "gpt-5-codex", "claude-sonnet-4", + "claude-sonnet-4.5", + "claude-haiku-4.5", + "gemini-2.5-pro", ]; -pub const GITHUB_COPILOT_STREAM_MODELS: &[&str] = - &["gpt-4.1", "claude-3.7-sonnet", "claude-sonnet-4"]; +pub const GITHUB_COPILOT_STREAM_MODELS: &[&str] = &[ + "gpt-4.1", + "gpt-5", + "gpt-5-mini", + "gpt-5-codex", + "claude-sonnet-4", + "claude-sonnet-4.5", + "claude-haiku-4.5", + "gemini-2.5-pro", + "grok-code-fast-1", +]; const GITHUB_COPILOT_DOC_URL: &str = "https://docs.github.com/en/copilot/using-github-copilot/ai-models";