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-3.7-flash";
3
4pub const SUPPORTED_MODELS: &[&str] = &[
5    "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)
6    "gemini-4-argon", // Gemini 4 Argon - flagship for hardest problems (unified 1M window, 64k sync output, low/medium/high)
7    "gemini-3.6-flash", // Gemini 3.6 Flash - flash model with improved capabilities
8    "gemini-3.7-flash", // Gemini 3.7 Flash - flash model with 1M context and tunable thinking
9    "gemini-3.8-flash", // Gemini 3.8 Flash - most intelligent Flash for long-horizon SWE/agents (1M, 64k output, low/medium/high)
10    "gemini-3-flash-preview", // Fast version of Gemini 3 Pro with 3-level thinking
11    "gemini-3-pro-image-preview", // Image generation model with 4K resolution
12];
13
14/// Models that support thinking/reasoning capability with configurable thinking_level
15/// Based on: <https://ai.google.dev/gemini-api/docs/gemini-3>
16/// Gemini 3 Pro: supports low, high
17/// Gemini 3 Flash Preview: supports minimal, low, medium, high
18/// Gemini 3.7/3.8 Flash: supports low, medium (default), high — `minimal` not supported on 3.8 and will error
19pub const REASONING_MODELS: &[&str] = &[
20    "gemini-4-carbon",
21    "gemini-4-argon",
22    "gemini-3.6-flash",
23    "gemini-3.7-flash",
24    "gemini-3.8-flash",
25    "gemini-3-flash-preview",
26];
27
28/// Models that support Gemini 3 extended thinking levels (minimal, medium)
29/// Only `gemini-3-flash-preview` supports `minimal`; stable 3.7/3.8 Flash support low/medium/high with medium as default
30pub const EXTENDED_THINKING_MODELS: &[&str] = &["gemini-3-flash-preview"];
31
32/// Models supporting image generation
33pub const IMAGE_GENERATION_MODELS: &[&str] = &["gemini-3-pro-image-preview"];
34
35/// Models that support context caching
36/// Context caching reduces costs for repeated API calls with similar contexts
37/// Reference: <https://ai.google.dev/gemini-api/docs/caching>
38/// Gemini 4 Argon and Gemini 4 Carbon support implicit caching only —
39/// explicit `cachedContents` is not supported and requests referencing it fail;
40/// prefer Implicit mode.
41pub const CACHING_MODELS: &[&str] = &[
42    "gemini-4-carbon",
43    "gemini-4-argon",
44    "gemini-3.6-flash",
45    "gemini-3.7-flash",
46    "gemini-3.8-flash",
47    "gemini-3-flash-preview",
48];
49
50/// Models that reject explicit `cachedContents` entirely and support implicit
51/// caching only. The provider must skip its explicit-cache lifecycle for these
52/// models even when `[prompt_cache] mode = "explicit"` is configured —
53/// creation requests fail and references in generateContent bodies error.
54/// Reference: <https://ai.google.dev/gemini-api/docs/models/gemini-4-argon>,
55/// <https://ai.google.dev/gemini-api/docs/models/gemini-4-carbon>
56pub const IMPLICIT_CACHING_ONLY_MODELS: &[&str] = &["gemini-4-carbon", "gemini-4-argon"];
57
58/// Models that support code execution (Python)
59/// Code execution allows models to write and execute Python code
60/// Reference: <https://ai.google.dev/gemini-api/docs/code-execution>
61pub const CODE_EXECUTION_MODELS: &[&str] = &[
62    "gemini-4-carbon",
63    "gemini-4-argon",
64    "gemini-3.6-flash",
65    "gemini-3.7-flash",
66    "gemini-3.8-flash",
67    "gemini-3-flash-preview",
68];
69
70// Convenience constants for commonly used models
71pub const GEMINI_4_CARBON: &str = "gemini-4-carbon";
72pub const GEMINI_4_ARGON: &str = "gemini-4-argon";
73pub const GEMINI_3_6_FLASH: &str = "gemini-3.6-flash";
74pub const GEMINI_3_7_FLASH: &str = "gemini-3.7-flash";
75pub const GEMINI_3_8_FLASH: &str = "gemini-3.8-flash";
76pub const GEMINI_3_FLASH_PREVIEW: &str = "gemini-3-flash-preview";
77pub const GEMINI_3_PRO_IMAGE_PREVIEW: &str = "gemini-3-pro-image-preview";