Skip to main content

vtcode_config/constants/models/
openai.rs

1pub const DEFAULT_MODEL: &str = "gpt-5.4";
2pub const SUPPORTED_MODELS: &[&str] = &[
3    GPT,
4    "gpt-5.1",
5    "gpt-5.4",
6    "gpt-5.4-pro",
7    "gpt-5.4-nano",
8    "gpt-5.4-mini",
9    "gpt-5.3-codex", // GPT-5.3 Codex optimized for agentic coding with xhigh reasoning support
10    "gpt-5.2-codex", // GPT-5.2 Codex optimized for agentic coding with xhigh reasoning support
11    "gpt-5.1-codex", // GPT-5.1 Codex optimized for agentic coding
12    "gpt-5.1-codex-max", // GPT-5.1 Codex Max higher-compute coding variant
13    "gpt-5.1-mini",
14    "gpt-5-codex", // GPT-5 Codex optimized for agentic coding
15    "gpt-5.2",
16    "gpt-5",
17    "gpt-5-mini",
18    "gpt-5-nano",
19    "codex-mini-latest",
20    "o3",
21    "o4-mini",
22    "gpt-oss-20b",
23    "gpt-oss-120b",
24];
25
26/// Models that require the OpenAI Responses API
27pub const RESPONSES_API_MODELS: &[&str] = &[
28    GPT,
29    GPT_5_1,
30    GPT_5,
31    GPT_5_2,
32    GPT_5_4,
33    GPT_5_4_PRO,
34    GPT_5_3_CODEX,
35    GPT_5_2_CODEX,
36    GPT_5_1_CODEX,
37    GPT_5_1_CODEX_MAX,
38    GPT_5_CODEX,
39    GPT_5_MINI,
40    GPT_5_NANO,
41    GPT_5_1_MINI,
42    CODEX_MINI_LATEST,
43    O3,
44    O4_MINI,
45];
46
47/// Models that support the OpenAI reasoning parameter payload
48pub const REASONING_MODELS: &[&str] = &[
49    GPT,
50    GPT_5_1,
51    GPT_5,
52    GPT_5_2,
53    GPT_5_4,
54    GPT_5_4_PRO,
55    GPT_5_3_CODEX,
56    GPT_5_2_CODEX,
57    GPT_5_1_CODEX,
58    GPT_5_1_CODEX_MAX,
59    GPT_5_CODEX,
60    GPT_5_MINI,
61    GPT_5_NANO,
62    O3,
63    O4_MINI,
64];
65
66/// Models that support the native OpenAI `service_tier` request parameter.
67pub const SERVICE_TIER_MODELS: &[&str] = RESPONSES_API_MODELS;
68
69/// Models that do not expose structured tool calling on the OpenAI platform
70pub const TOOL_UNAVAILABLE_MODELS: &[&str] = &[];
71
72/// GPT-OSS models that use harmony tokenization
73pub const HARMONY_MODELS: &[&str] = &[GPT_OSS_20B, GPT_OSS_120B];
74
75// Convenience constants for commonly used models
76pub const GPT: &str = "gpt";
77pub const GPT_5_1: &str = "gpt-5.1";
78pub const GPT_5: &str = "gpt-5";
79pub const GPT_5_2: &str = "gpt-5.2";
80pub const GPT_5_4: &str = "gpt-5.4";
81pub const GPT_5_4_PRO: &str = "gpt-5.4-pro";
82pub const GPT_5_4_NANO: &str = "gpt-5.4-nano";
83pub const GPT_5_4_MINI: &str = "gpt-5.4-mini";
84pub const GPT_5_3_CODEX: &str = "gpt-5.3-codex"; // GPT-5.3 Codex optimized for agentic coding
85pub const GPT_5_2_CODEX: &str = "gpt-5.2-codex"; // GPT-5.2 Codex optimized for agentic coding
86pub const GPT_5_1_CODEX: &str = "gpt-5.1-codex"; // GPT-5.1 Codex optimized for agentic coding
87pub const GPT_5_1_CODEX_MAX: &str = "gpt-5.1-codex-max"; // GPT-5.1 Codex Max optimized for longer-running coding tasks
88pub const GPT_5_1_MINI: &str = "gpt-5.1-mini";
89pub const GPT_5_CODEX: &str = "gpt-5-codex"; // GPT-5 Codex optimized for agentic coding
90pub const GPT_5_MINI: &str = "gpt-5-mini";
91pub const GPT_5_NANO: &str = "gpt-5-nano";
92pub const CODEX_MINI_LATEST: &str = "codex-mini-latest";
93pub const O3: &str = "o3";
94pub const O4_MINI: &str = "o4-mini";
95pub const GPT_OSS_20B: &str = "gpt-oss-20b";
96pub const GPT_OSS_120B: &str = "gpt-oss-120b";