Skip to content

Commit 6074aa7

Browse files
committed
feat(aliases): add new ChatModel constants for GPT-4.1 variants
1 parent c0414f1 commit 6074aa7

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

aliases.go

+18
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ const ChatModelO1Mini = shared.ChatModelO1Mini
4444
// Equals "o1-mini-2024-09-12"
4545
const ChatModelO1Mini2024_09_12 = shared.ChatModelO1Mini2024_09_12
4646

47+
// Equals "gpt-4-1"
48+
const ChatModelGPT4_1 = shared.ChatModelGPT4_1
49+
50+
// Equals "gpt-4-1-2025-04-14"
51+
const ChatModelGPT4_1_2025_04_14 = shared.ChatModelGPT4_1_2025_04_14
52+
53+
// Equals "gpt-4-1-mini"
54+
const ChatModelGPT4_1Mini = shared.ChatModelGPT4_1Mini
55+
56+
// Equals "gpt-4-1-mini-2025-04-14"
57+
const ChatModelGPT4_1Mini_2025_04_14 = shared.ChatModelGPT4_1Mini_2025_04_14
58+
59+
// Equals "gpt-4-1-nano"
60+
const ChatModelGPT4_1Nano = shared.ChatModelGPT4_1Nano
61+
62+
// Equals "gpt-4-1-nano-2025-04-14"
63+
const ChatModelGPT4_1Nano_2025_04_14 = shared.ChatModelGPT4_1Nano_2025_04_14
64+
4765
// Equals "gpt-4o"
4866
const ChatModelGPT4o = shared.ChatModelGPT4o
4967

responses/aliases.go

+18
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ const ChatModelO1Mini = shared.ChatModelO1Mini
4444
// Equals "o1-mini-2024-09-12"
4545
const ChatModelO1Mini2024_09_12 = shared.ChatModelO1Mini2024_09_12
4646

47+
// Equals "gpt-4-1"
48+
const ChatModelGPT4_1 = shared.ChatModelGPT4_1
49+
50+
// Equals "gpt-4-1-2025-04-14"
51+
const ChatModelGPT4_1_2025_04_14 = shared.ChatModelGPT4_1_2025_04_14
52+
53+
// Equals "gpt-4-1-mini"
54+
const ChatModelGPT4_1Mini = shared.ChatModelGPT4_1Mini
55+
56+
// Equals "gpt-4-1-mini-2025-04-14"
57+
const ChatModelGPT4_1Mini_2025_04_14 = shared.ChatModelGPT4_1Mini_2025_04_14
58+
59+
// Equals "gpt-4-1-nano"
60+
const ChatModelGPT4_1Nano = shared.ChatModelGPT4_1Nano
61+
62+
// Equals "gpt-4-1-nano-2025-04-14"
63+
const ChatModelGPT4_1Nano_2025_04_14 = shared.ChatModelGPT4_1Nano_2025_04_14
64+
4765
// Equals "gpt-4o"
4866
const ChatModelGPT4o = shared.ChatModelGPT4o
4967

shared/shared.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ const (
2828
ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"
2929
ChatModelO1Mini ChatModel = "o1-mini"
3030
ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"
31+
ChatModelGPT4_1 ChatModel = "gpt-4.1"
32+
ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"
33+
ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"
34+
ChatModelGPT4_1Mini_2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"
35+
ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"
36+
ChatModelGPT4_1Nano_2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"
3137
ChatModelGPT4o ChatModel = "gpt-4o"
3238
ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"
3339
ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"
@@ -168,7 +174,6 @@ func (u ComparisonFilterValueUnion) AsBool() (v bool) {
168174

169175
// Returns the unmodified JSON received from the API
170176
func (u ComparisonFilterValueUnion) RawJSON() string { return u.JSON.raw }
171-
172177
func (r *ComparisonFilterValueUnion) UnmarshalJSON(data []byte) error {
173178
return apijson.UnmarshalRoot(data, r)
174179
}

0 commit comments

Comments
 (0)