Skip to content

Commit 73e661b

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

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
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

+7
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"
@@ -686,6 +692,7 @@ type ResponseFormatJSONSchemaJSONSchemaParam struct {
686692
func (f ResponseFormatJSONSchemaJSONSchemaParam) IsPresent() bool {
687693
return !param.IsOmitted(f) && !f.IsNull()
688694
}
695+
689696
func (r ResponseFormatJSONSchemaJSONSchemaParam) MarshalJSON() (data []byte, err error) {
690697
type shadow ResponseFormatJSONSchemaJSONSchemaParam
691698
return param.MarshalObject(r, (*shadow)(&r))

0 commit comments

Comments
 (0)