From 2c03f9e88c55a3f41923f3c95dc30ecece53d06d Mon Sep 17 00:00:00 2001 From: Alex Hancock Date: Thu, 6 Nov 2025 09:50:37 -0500 Subject: [PATCH] feat(githubcopilot): add support for newer Copilot AI Models (#5603) Signed-off-by: Ramazan Sancar Co-authored-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 a4478ac1..6119783e 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";