Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,11 @@ Models are represented as a typealias `typealias Model = String`.

```swift
public extension Model {
static let gpt5 = "gpt-5"
static let gpt5_mini = "gpt-5-mini"
static let gpt5_nano = "gpt-5-nano"
static let gpt5_chat = "gpt-5-chat"

static let gpt4_1 = "gpt-4.1"
static let gpt4_1_mini = "gpt-4.1-mini"
static let gpt4_1_nano = "gpt-4.1-nano"
Expand Down
18 changes: 16 additions & 2 deletions Sources/OpenAI/Public/Models/Models/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ public extension Model {
@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")
static let gpt4_5_preview = "gpt-4.5-preview"

// GPT-5

/// `gpt-5` OpenAI's best AI system with significant leap in intelligence, designed for logic and multi-step tasks with deep reasoning
static let gpt5 = "gpt-5"

/// `gpt-5-mini` Lightweight GPT-5 version for cost-sensitive applications
static let gpt5_mini = "gpt-5-mini"

/// `gpt-5-nano` Optimized for ultra-low latency and fast execution
static let gpt5_nano = "gpt-5-nano"

/// `gpt-5-chat` Built for advanced, natural, multimodal conversations
static let gpt5_chat = "gpt-5-chat"

// GPT-4.1

/// `gpt-4.1` Smartest model for complex tasks
Expand Down Expand Up @@ -247,7 +261,7 @@ public extension Model {
// reasoning
.o4_mini, o3, o3_mini, .o1,
// flagship
.gpt4_1, .gpt4_o, .gpt_4o_audio_preview, chatgpt_4o_latest,
.gpt5, .gpt5_mini, .gpt5_nano, .gpt5_chat, .gpt4_1, .gpt4_o, .gpt_4o_audio_preview, chatgpt_4o_latest,
// cost-optimized
.gpt4_1_mini, .gpt4_1_nano, .gpt4_o_mini, .gpt_4o_mini_audio_preview,
// tool-specific
Expand All @@ -260,7 +274,7 @@ public extension Model {
// reasoning
.o4_mini, .o3, .o3_mini, .o1, .o1_pro,
// flagship
.gpt4_1, .gpt4_o, .chatgpt_4o_latest,
.gpt5, .gpt5_mini, .gpt5_nano, .gpt5_chat, .gpt4_1, .gpt4_o, .chatgpt_4o_latest,
// cost-optimized
.gpt4_1_mini, .gpt4_1_nano, .gpt4_o_mini,
.gpt4_turbo, .gpt4, .gpt3_5Turbo,
Expand Down
Loading