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