Skip to content

feat(aliases): add new ChatModel constants for GPT-4.1 variants #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ const ChatModelO1Mini = shared.ChatModelO1Mini
// Equals "o1-mini-2024-09-12"
const ChatModelO1Mini2024_09_12 = shared.ChatModelO1Mini2024_09_12

// Equals "gpt-4-1"
const ChatModelGPT4_1 = shared.ChatModelGPT4_1

// Equals "gpt-4-1-2025-04-14"
const ChatModelGPT4_1_2025_04_14 = shared.ChatModelGPT4_1_2025_04_14

// Equals "gpt-4-1-mini"
const ChatModelGPT4_1Mini = shared.ChatModelGPT4_1Mini

// Equals "gpt-4-1-mini-2025-04-14"
const ChatModelGPT4_1Mini_2025_04_14 = shared.ChatModelGPT4_1Mini_2025_04_14

// Equals "gpt-4-1-nano"
const ChatModelGPT4_1Nano = shared.ChatModelGPT4_1Nano

// Equals "gpt-4-1-nano-2025-04-14"
const ChatModelGPT4_1Nano_2025_04_14 = shared.ChatModelGPT4_1Nano_2025_04_14

// Equals "gpt-4o"
const ChatModelGPT4o = shared.ChatModelGPT4o

Expand Down
18 changes: 18 additions & 0 deletions responses/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ const ChatModelO1Mini = shared.ChatModelO1Mini
// Equals "o1-mini-2024-09-12"
const ChatModelO1Mini2024_09_12 = shared.ChatModelO1Mini2024_09_12

// Equals "gpt-4-1"
const ChatModelGPT4_1 = shared.ChatModelGPT4_1

// Equals "gpt-4-1-2025-04-14"
const ChatModelGPT4_1_2025_04_14 = shared.ChatModelGPT4_1_2025_04_14

// Equals "gpt-4-1-mini"
const ChatModelGPT4_1Mini = shared.ChatModelGPT4_1Mini

// Equals "gpt-4-1-mini-2025-04-14"
const ChatModelGPT4_1Mini_2025_04_14 = shared.ChatModelGPT4_1Mini_2025_04_14

// Equals "gpt-4-1-nano"
const ChatModelGPT4_1Nano = shared.ChatModelGPT4_1Nano

// Equals "gpt-4-1-nano-2025-04-14"
const ChatModelGPT4_1Nano_2025_04_14 = shared.ChatModelGPT4_1Nano_2025_04_14

// Equals "gpt-4o"
const ChatModelGPT4o = shared.ChatModelGPT4o

Expand Down
7 changes: 6 additions & 1 deletion shared/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ const (
ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"
ChatModelO1Mini ChatModel = "o1-mini"
ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"
ChatModelGPT4_1 ChatModel = "gpt-4.1"
ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"
ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"
ChatModelGPT4_1Mini_2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"
ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"
ChatModelGPT4_1Nano_2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"
ChatModelGPT4o ChatModel = "gpt-4o"
ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"
ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"
Expand Down Expand Up @@ -168,7 +174,6 @@ func (u ComparisonFilterValueUnion) AsBool() (v bool) {

// Returns the unmodified JSON received from the API
func (u ComparisonFilterValueUnion) RawJSON() string { return u.JSON.raw }

func (r *ComparisonFilterValueUnion) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}
Expand Down