Skip to main content

vtcode_config/constants/models/
openai.rs

1pub const DEFAULT_MODEL: &str = "gpt-5";
2pub const SUPPORTED_MODELS: &[&str] = &[
3    "gpt-5",
4    "gpt-5-codex",
5    "gpt-5-mini",
6    "gpt-5-nano",
7    "gpt-5.2",
8    "gpt-5.2-2025-12-11",
9    "gpt-5.2-codex",
10    "gpt-5.1",           // Enhanced version of GPT-5 with temperature support and streaming
11    "gpt-5.1-codex",     // Enhanced version of GPT-5 Codex with temperature support and streaming
12    "gpt-5.1-codex-max", // Enhanced version of GPT-5 Codex with temperature support and streaming
13    "gpt-5.1-mini",      // Enhanced mini version with temperature support and streaming
14    "codex-mini-latest",
15    "gpt-oss-20b",
16    "gpt-oss-120b",
17];
18
19/// Models that require the OpenAI Responses API
20pub const RESPONSES_API_MODELS: &[&str] = &[
21    GPT_5,
22    GPT_5_CODEX,
23    GPT_5_MINI,
24    GPT_5_NANO,
25    GPT_5_2,
26    GPT_5_2_ALIAS,
27    GPT_5_2_CODEX,
28    GPT_5_1,
29    GPT_5_1_CODEX,
30    GPT_5_1_CODEX_MAX,
31    GPT_5_1_MINI,
32];
33
34/// Models that support the OpenAI reasoning parameter payload
35pub const REASONING_MODELS: &[&str] = &[
36    GPT_5,
37    GPT_5_CODEX,
38    GPT_5_MINI,
39    GPT_5_NANO,
40    GPT_5_2,
41    GPT_5_2_ALIAS,
42    GPT_5_2_CODEX,
43    GPT_5_1,
44    GPT_5_1_CODEX,
45    GPT_5_1_CODEX_MAX,
46];
47
48/// Models that do not expose structured tool calling on the OpenAI platform
49pub const TOOL_UNAVAILABLE_MODELS: &[&str] = &[];
50
51/// GPT-OSS models that use harmony tokenization
52pub const HARMONY_MODELS: &[&str] = &[GPT_OSS_20B, GPT_OSS_120B];
53
54// Convenience constants for commonly used models
55pub const GPT_5: &str = "gpt-5";
56pub const GPT_5_CODEX: &str = "gpt-5-codex";
57pub const GPT_5_MINI: &str = "gpt-5-mini";
58pub const GPT_5_NANO: &str = "gpt-5-nano";
59pub const GPT_5_2: &str = "gpt-5.2";
60pub const GPT_5_2_ALIAS: &str = "gpt-5.2-2025-12-11";
61pub const GPT_5_2_CODEX: &str = "gpt-5.2-codex";
62pub const GPT_5_1: &str = "gpt-5.1"; // Enhanced version with temperature support and streaming
63pub const GPT_5_1_CODEX: &str = "gpt-5.1-codex"; // Enhanced version with temperature support and streaming
64pub const GPT_5_1_CODEX_MAX: &str = "gpt-5.1-codex-max"; // Enhanced version with temperature support and streaming
65pub const GPT_5_1_MINI: &str = "gpt-5.1-mini"; // Enhanced version with temperature support and streaming
66pub const CODEX_MINI_LATEST: &str = "codex-mini-latest";
67pub const GPT_OSS_20B: &str = "gpt-oss-20b";
68pub const GPT_OSS_120B: &str = "gpt-oss-120b";