Skip to content

Commit 16e7079

Browse files
committed
Add new gpt-5 models
1 parent 5bd067b commit 16e7079

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Sources/OpenAI/Model.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@
77

88
public typealias Model = String
99

10+
// MARK: - GPT-5
11+
12+
extension Model {
13+
/// GPT-5 is a flagship model for coding, reasoning, and agentic tasks across domains.
14+
///
15+
/// * Context window: 400,000
16+
/// * Max output tokens: 128,000
17+
public static let gpt5: Model = "gpt-5"
18+
19+
/// GPT-5 mini is a faster, more cost-efficient version of GPT-5. It's great for well-defined
20+
/// tasks and precise prompts.
21+
///
22+
/// * Context window: 400,000
23+
/// * Max output tokens: 128,000
24+
public static let gpt5_mini: Model = "gpt-5-mini"
25+
26+
/// GPT-5 Nano is the fastest, cheapest version of GPT-5. It's great for summarization and
27+
/// classification tasks.
28+
///
29+
/// * Context window: 400,000
30+
/// * Max output tokens: 128,000
31+
public static let gpt5_nano: Model = "gpt-5-nano"
32+
33+
/// GPT-5 Chat points to the GPT-5 snapshot currently used in ChatGPT.
34+
///
35+
/// * Context window: 400,000
36+
/// * Max output tokens: 128,000
37+
public static let gpt5_chat: Model = "gpt-5-chat-latest"
38+
}
39+
1040
// MARK: - GPT-4.1
1141

1242
extension Model {

0 commit comments

Comments
 (0)