pub enum Model {
Show 22 variants
Gemini35Flash,
Gemini31ProPreview,
Gemini31FlashLite,
Gemini31FlashImage,
Gemini3ProPreview,
Gemini3ProImage,
Gemini3ProImagePreview,
Gemini3FlashPreview,
Gemini25Pro,
Gemini25ProPreviewTts,
Gemini25Flash,
Gemini25FlashPreview092025,
Gemini25FlashImage,
Gemini25FlashImagePreview,
Gemini25FlashLive122025,
Gemini25FlashLive092025,
Gemini25FlashPreviewTts,
Gemini25FlashLite,
Gemini25FlashLitePreview092025,
GeminiEmbedding2,
GeminiEmbedding001,
Custom(String),
}Expand description
Available Gemini model identifiers.
Each variant maps to a specific model version on the Gemini API.
Use Model::Custom for model IDs not yet represented as variants.
Variants§
Gemini35Flash
Gemini 3.5 Flash.
Gemini31ProPreview
Gemini 3.1 Pro preview — strongest reasoning.
Gemini31FlashLite
Gemini 3.1 Flash Lite — GA, most cost-efficient for high-volume agentic tasks.
Gemini31FlashImage
Gemini 3.1 Flash Image (Nano Banana 2) — GA native image generation.
Gemini3ProPreview
Gemini 3 Pro preview.
Gemini3ProImage
Gemini 3 Pro Image (Nano Banana Pro) — GA multimodal output.
Gemini3ProImagePreview
Shut down June 25, 2026. Use Model::Gemini3ProImage instead.
Gemini 3 Pro Image preview (deprecated).
Gemini3FlashPreview
Gemini 3 Flash preview — good balance of speed and capability.
Gemini25Pro
Gemini 2.5 Pro — advanced reasoning.
Gemini25ProPreviewTts
Gemini 2.5 Pro preview with TTS support.
Gemini25Flash
Gemini 2.5 Flash.
Gemini25FlashPreview092025
Gemini 2.5 Flash preview (September 2025).
Gemini25FlashImage
Gemini 2.5 Flash with image generation.
Gemini25FlashImagePreview
Use Model::Gemini25FlashImage instead
Deprecated: use Gemini25FlashImage instead.
Gemini25FlashLive122025
Gemini 2.5 Flash native audio preview (December 2025).
Gemini25FlashLive092025
Gemini 2.5 Flash native audio preview (September 2025).
Gemini25FlashPreviewTts
Gemini 2.5 Flash preview with TTS support.
Gemini25FlashLite
Gemini 2.5 Flash Lite — cost-efficient.
Gemini25FlashLitePreview092025
Gemini 2.5 Flash Lite preview (September 2025).
GeminiEmbedding2
Gemini Embedding 2 — GA multimodal embeddings (text, image, video, audio, PDF).
GeminiEmbedding001
Gemini Embedding 001 (3072 dimensions). Replaces text-embedding-004.
Custom(String)
A custom model identifier string (e.g. "models/my-tuned-model").
Implementations§
Source§impl Model
impl Model
Sourcepub fn gemini_3_7_flash() -> Self
pub fn gemini_3_7_flash() -> Self
Return the current balanced Gemini default.
This factory avoids adding a new enum variant whenever Google releases a model while preserving exhaustive matches for existing callers.
Sourcepub fn gemini_3_6_flash() -> Self
pub fn gemini_3_6_flash() -> Self
Return Gemini 3.6 Flash.
Sourcepub fn gemini_3_5_flash_lite() -> Self
pub fn gemini_3_5_flash_lite() -> Self
Return Gemini 3.5 Flash-Lite, the most cost-efficient GA model.
Sourcepub fn vertex_model_path(&self, project_id: &str, location: &str) -> String
pub fn vertex_model_path(&self, project_id: &str, location: &str) -> String
Returns the Vertex AI model resource path for this model.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Model
impl<'de> Deserialize<'de> for Model
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Model
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnsafeUnpin for Model
impl UnwindSafe for Model
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.