vtcode_config/constants/models/google.rs
1/// Default model - using the current stable Flash model for production reliability
2pub const DEFAULT_MODEL: &str = GEMINI_3_8_FLASH;
3
4pub const SUPPORTED_MODELS: &[&str] = &[
5 "gemini-4-neon", // Gemini 4 Neon - frontier intelligence with fast end-to-end task completion for complex software engineering, knowledge work, and science (unified 1M window, 64k sync output, low/medium/high/xhigh)
6 "gemini-4-hydrogen", // Gemini 4 Hydrogen - fast and efficient for everyday coding and agentic workflows (unified 1M window, 64k sync output, low/medium/high/xhigh)
7 "gemini-4-carbon", // Gemini 4 Carbon - strongest reasoning model for sustained agentic coding, multimodal knowledge work, scientific reasoning, cybersecurity defense (unified 1M window, 64k sync output, low/medium/high)
8 "gemini-4-argon", // Gemini 4 Argon - flagship for hardest problems (unified 1M window, 64k sync output, low/medium/high)
9 "gemini-3.6-flash", // Gemini 3.6 Flash - flash model with improved capabilities
10 "gemini-3.7-flash", // Legacy alias that automatically routes API requests to Gemini 3.8 Flash
11 "gemini-3.8-flash", // Gemini 3.8 Flash - most intelligent Flash for long-horizon SWE/agents (1M, 64k output, low/medium/high)
12 "gemini-3-flash-preview", // Fast version of Gemini 3 Pro with 3-level thinking
13 "gemini-nano-banana-2.1", // Stable Gemini image generation and editing model
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> and
18/// <https://ai.google.dev/gemini-api/docs/models/gemini-nano-banana-2.1>
19/// Gemini 3 Pro: supports low, high
20/// Gemini 3 Flash Preview: supports minimal, low, medium, high
21/// Gemini 3.7/3.8 Flash: supports low, medium (default), high — `minimal` not supported on 3.8 and will error
22/// Gemini Nano Banana 2.1: supports minimal, medium, high
23pub const REASONING_MODELS: &[&str] = &[
24 "gemini-4-neon",
25 "gemini-4-hydrogen",
26 "gemini-4-carbon",
27 "gemini-4-argon",
28 "gemini-3.6-flash",
29 "gemini-3.7-flash",
30 "gemini-3.8-flash",
31 "gemini-3-flash-preview",
32 GEMINI_NANO_BANANA_2_1,
33];
34
35/// Models that support extended thinking levels beyond the low/high baseline.
36/// Gemini 3 Flash Preview and Nano Banana 2.1 support `minimal`; stable 3.7/3.8 Flash do not.
37pub const EXTENDED_THINKING_MODELS: &[&str] = &["gemini-3-flash-preview", GEMINI_NANO_BANANA_2_1];
38
39/// Models that support the `xhigh` thinking level (Gemini 4 Hydrogen and later).
40/// Hydrogen and Neon default to `high` and add `xhigh` for hard multi-step problems.
41pub const XHIGH_THINKING_MODELS: &[&str] = &["gemini-4-neon", "gemini-4-hydrogen"];
42
43/// Google API models that support image generation; VT Code does not yet expose generated image artifacts.
44pub const IMAGE_GENERATION_MODELS: &[&str] = &[GEMINI_NANO_BANANA_2_1];
45
46/// Models that support context caching
47/// Context caching reduces costs for repeated API calls with similar contexts
48/// Reference: <https://ai.google.dev/gemini-api/docs/caching>
49/// Gemini 4 Neon, Hydrogen, Argon, and Carbon support implicit caching only —
50/// explicit `cachedContents` is not supported and requests referencing it fail;
51/// prefer Implicit mode.
52pub const CACHING_MODELS: &[&str] = &[
53 "gemini-4-neon",
54 "gemini-4-hydrogen",
55 "gemini-4-carbon",
56 "gemini-4-argon",
57 "gemini-3.6-flash",
58 "gemini-3.7-flash",
59 "gemini-3.8-flash",
60 "gemini-3-flash-preview",
61];
62
63/// Models that reject explicit `cachedContents` entirely and support implicit
64/// caching only. The provider must skip its explicit-cache lifecycle for these
65/// models even when `[prompt_cache] mode = "explicit"` is configured —
66/// creation requests fail and references in generateContent bodies error.
67/// Reference: <https://ai.google.dev/gemini-api/docs/models/gemini-4-argon>,
68/// <https://ai.google.dev/gemini-api/docs/models/gemini-4-carbon>,
69/// <https://ai.google.dev/gemini-api/docs/models/gemini-4-hydrogen>
70pub const IMPLICIT_CACHING_ONLY_MODELS: &[&str] = &[
71 "gemini-4-neon",
72 "gemini-4-hydrogen",
73 "gemini-4-carbon",
74 "gemini-4-argon",
75];
76
77/// Models that support code execution (Python)
78/// Code execution allows models to write and execute Python code
79/// Reference: <https://ai.google.dev/gemini-api/docs/code-execution>
80pub const CODE_EXECUTION_MODELS: &[&str] = &[
81 "gemini-4-neon",
82 "gemini-4-hydrogen",
83 "gemini-4-carbon",
84 "gemini-4-argon",
85 "gemini-3.6-flash",
86 "gemini-3.7-flash",
87 "gemini-3.8-flash",
88 "gemini-3-flash-preview",
89];
90
91// Convenience constants for commonly used models
92pub const GEMINI_4_NEON: &str = "gemini-4-neon";
93pub const GEMINI_4_HYDROGEN: &str = "gemini-4-hydrogen";
94pub const GEMINI_4_CARBON: &str = "gemini-4-carbon";
95pub const GEMINI_4_ARGON: &str = "gemini-4-argon";
96pub const GEMINI_3_6_FLASH: &str = "gemini-3.6-flash";
97pub const GEMINI_3_7_FLASH: &str = "gemini-3.7-flash";
98pub const GEMINI_3_8_FLASH: &str = "gemini-3.8-flash";
99pub const GEMINI_3_FLASH_PREVIEW: &str = "gemini-3-flash-preview";
100pub const GEMINI_NANO_BANANA_2_1: &str = "gemini-nano-banana-2.1";
101
102#[deprecated(note = "Gemini 3 Pro Image Preview shut down on June 25, 2026; use GEMINI_NANO_BANANA_2_1")]
103pub const GEMINI_3_PRO_IMAGE_PREVIEW: &str = "gemini-3-pro-image-preview";