Skip to content

Commit 80045fc

Browse files
authored
Merge pull request #374 from piscue/add-gpt-5-models
Add GPT-5 models
2 parents a88eb1d + 106625b commit 80045fc

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,11 @@ Models are represented as a typealias `typealias Model = String`.
11591159

11601160
```swift
11611161
public extension Model {
1162+
static let gpt5 = "gpt-5"
1163+
static let gpt5_mini = "gpt-5-mini"
1164+
static let gpt5_nano = "gpt-5-nano"
1165+
static let gpt5_chat = "gpt-5-chat"
1166+
11621167
static let gpt4_1 = "gpt-4.1"
11631168
static let gpt4_1_mini = "gpt-4.1-mini"
11641169
static let gpt4_1_nano = "gpt-4.1-nano"

Sources/OpenAI/Public/Models/Models/Models.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ public extension Model {
5353
@available(*, deprecated, message: "On April 14th, 2025, developers were notified that the gpt-4.5-preview model is deprecated and will be removed from the API in the coming months. Recommended replacement: gpt-4.1")
5454
static let gpt4_5_preview = "gpt-4.5-preview"
5555

56+
// GPT-5
57+
58+
/// `gpt-5` OpenAI's best AI system with significant leap in intelligence, designed for logic and multi-step tasks with deep reasoning
59+
static let gpt5 = "gpt-5"
60+
61+
/// `gpt-5-mini` Lightweight GPT-5 version for cost-sensitive applications
62+
static let gpt5_mini = "gpt-5-mini"
63+
64+
/// `gpt-5-nano` Optimized for ultra-low latency and fast execution
65+
static let gpt5_nano = "gpt-5-nano"
66+
67+
/// `gpt-5-chat` Built for advanced, natural, multimodal conversations
68+
static let gpt5_chat = "gpt-5-chat"
69+
5670
// GPT-4.1
5771

5872
/// `gpt-4.1` Smartest model for complex tasks
@@ -247,7 +261,7 @@ public extension Model {
247261
// reasoning
248262
.o4_mini, o3, o3_mini, .o1,
249263
// flagship
250-
.gpt4_1, .gpt4_o, .gpt_4o_audio_preview, chatgpt_4o_latest,
264+
.gpt5, .gpt5_mini, .gpt5_nano, .gpt5_chat, .gpt4_1, .gpt4_o, .gpt_4o_audio_preview, chatgpt_4o_latest,
251265
// cost-optimized
252266
.gpt4_1_mini, .gpt4_1_nano, .gpt4_o_mini, .gpt_4o_mini_audio_preview,
253267
// tool-specific
@@ -260,7 +274,7 @@ public extension Model {
260274
// reasoning
261275
.o4_mini, .o3, .o3_mini, .o1, .o1_pro,
262276
// flagship
263-
.gpt4_1, .gpt4_o, .chatgpt_4o_latest,
277+
.gpt5, .gpt5_mini, .gpt5_nano, .gpt5_chat, .gpt4_1, .gpt4_o, .chatgpt_4o_latest,
264278
// cost-optimized
265279
.gpt4_1_mini, .gpt4_1_nano, .gpt4_o_mini,
266280
.gpt4_turbo, .gpt4, .gpt3_5Turbo,

0 commit comments

Comments
 (0)