Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add support for Gemini 2.5 Pro Experimental model (#27468)

Michael Sloan7376c6f37745
diff --git a/crates/google_ai/src/google_ai.rs b/crates/google_ai/src/google_ai.rs
index e885599a0fb..d9c465597f7 100644
--- a/crates/google_ai/src/google_ai.rs
+++ b/crates/google_ai/src/google_ai.rs
@@ -314,6 +314,8 @@ pub enum Model {
Gemini20FlashThinking,
#[serde(rename = "gemini-2.0-flash-lite-preview")]
Gemini20FlashLite,
+ #[serde(rename = "gemini-2.5-pro-exp-03-25")]
+ Gemini25ProExp0325,
#[serde(rename = "custom")]
Custom {
name: String,
@@ -332,6 +334,7 @@ impl Model {
Model::Gemini20Flash => "gemini-2.0-flash",
Model::Gemini20FlashThinking => "gemini-2.0-flash-thinking-exp",
Model::Gemini20FlashLite => "gemini-2.0-flash-lite-preview",
+ Model::Gemini25ProExp0325 => "gemini-2.5-pro-exp-03-25",
Model::Custom { name, .. } => name,
}
}
@@ -344,6 +347,7 @@ impl Model {
Model::Gemini20Flash => "Gemini 2.0 Flash",
Model::Gemini20FlashThinking => "Gemini 2.0 Flash Thinking",
Model::Gemini20FlashLite => "Gemini 2.0 Flash Lite",
+ Model::Gemini25ProExp0325 => "Gemini 2.5 Pro Exp",
Self::Custom {
name, display_name, ..
} => display_name.as_ref().unwrap_or(name),
@@ -358,6 +362,7 @@ impl Model {
Model::Gemini20Flash => 1_000_000,
Model::Gemini20FlashThinking => 1_000_000,
Model::Gemini20FlashLite => 1_000_000,
+ Model::Gemini25ProExp0325 => 1_000_000,
Model::Custom { max_tokens, .. } => *max_tokens,
}
}
diff --git a/crates/language_model/src/model/cloud_model.rs b/crates/language_model/src/model/cloud_model.rs
index 3d01affb7e6..21627f38e2b 100644
--- a/crates/language_model/src/model/cloud_model.rs
+++ b/crates/language_model/src/model/cloud_model.rs
@@ -106,6 +106,7 @@ impl CloudModel {
| google_ai::Model::Gemini20Flash
| google_ai::Model::Gemini20FlashThinking
| google_ai::Model::Gemini20FlashLite
+ | google_ai::Model::Gemini25ProExp0325
| google_ai::Model::Custom { .. } => {
LanguageModelAvailability::RequiresPlan(Plan::ZedPro)
}