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