Skip to main content

vtcode_config/constants/models/
google.rs

1/// Default model - using stable version for production reliability
2pub const DEFAULT_MODEL: &str = "gemini-2.5-flash";
3
4pub const SUPPORTED_MODELS: &[&str] = &[
5    "gemini-3-pro-preview",       // Latest flagship model with advanced reasoning
6    "gemini-3-flash-preview",     // Fast version of Gemini 3 Pro with 3-level thinking
7    "gemini-3-pro-image-preview", // Image generation model with 4K resolution
8    "gemini-2.5-pro",
9    "gemini-2.5-flash",
10    "gemini-2.5-flash-lite",
11    "gemini-2.5-flash-preview-05-20",
12    "gemini-1.5-pro",
13    "gemini-1.5-flash",
14];
15
16/// Models that support thinking/reasoning capability with configurable thinking_level
17/// Based on: https://ai.google.dev/gemini-api/docs/gemini-3
18/// Gemini 3 Pro/Flash: supports low, high (default)
19/// Gemini 3 Flash only: also supports minimal, medium
20pub const REASONING_MODELS: &[&str] = &[
21    "gemini-3-pro-preview",
22    "gemini-3-flash-preview",
23    "gemini-2.5-pro",
24    "gemini-2.5-flash",
25    "gemini-2.5-flash-lite",
26    "gemini-2.5-flash-preview-05-20",
27    "gemini-1.5-pro",
28    "gemini-1.5-flash",
29];
30
31/// Models that support Gemini 3 extended thinking levels (minimal, medium)
32/// Only Gemini 3 Flash supports these additional levels beyond low/high
33pub const EXTENDED_THINKING_MODELS: &[&str] = &["gemini-3-flash-preview"];
34
35/// Models supporting image generation
36pub const IMAGE_GENERATION_MODELS: &[&str] = &["gemini-3-pro-image-preview"];
37
38/// Models that support context caching (min 2048 tokens required)
39/// Context caching reduces costs for repeated API calls with similar contexts
40/// Reference: https://ai.google.dev/gemini-api/docs/caching
41pub const CACHING_MODELS: &[&str] = &[
42    "gemini-3-pro-preview",
43    "gemini-3-flash-preview",
44    "gemini-2.5-pro",
45    "gemini-2.5-flash",
46    "gemini-2.5-flash-lite",
47    "gemini-2.5-flash-preview-05-20",
48    "gemini-1.5-pro",
49    "gemini-1.5-flash",
50];
51
52/// Models that support code execution (Python)
53/// Code execution allows models to write and execute Python code
54/// Reference: https://ai.google.dev/gemini-api/docs/code-execution
55pub const CODE_EXECUTION_MODELS: &[&str] = &[
56    "gemini-3-pro-preview",
57    "gemini-3-flash-preview",
58    "gemini-2.5-pro",
59    "gemini-2.5-flash",
60    "gemini-2.5-flash-lite",
61    "gemini-2.5-flash-preview-05-20",
62    "gemini-1.5-pro",
63    "gemini-1.5-flash",
64];
65
66// Convenience constants for commonly used models
67pub const GEMINI_2_5_PRO: &str = "gemini-2.5-pro";
68pub const GEMINI_2_5_FLASH: &str = "gemini-2.5-flash";
69pub const GEMINI_2_5_FLASH_LITE: &str = "gemini-2.5-flash-lite";
70pub const GEMINI_2_5_FLASH_PREVIEW: &str = "gemini-2.5-flash-preview-05-20";
71pub const GEMINI_3_PRO_PREVIEW: &str = "gemini-3-pro-preview";
72pub const GEMINI_3_FLASH_PREVIEW: &str = "gemini-3-flash-preview";
73pub const GEMINI_3_PRO_IMAGE_PREVIEW: &str = "gemini-3-pro-image-preview";