@@ -40,6 +40,11 @@ func TestIsOpenAIReasoningModel(t *testing.T) {
4040 {"gpt-5-turbo" , "gpt-5-turbo" , true },
4141 {"GPT-5 uppercase" , "GPT-5" , true },
4242
43+ // GPT-5-chat variants are non-reasoning chat models
44+ {"gpt-5-chat-latest" , "gpt-5-chat-latest" , false },
45+ {"gpt-5-chat" , "gpt-5-chat" , false },
46+ {"GPT-5-CHAT uppercase" , "GPT-5-CHAT-LATEST" , false },
47+
4348 // GPT-4 series models - should NOT support reasoning
4449 {"gpt-4" , "gpt-4" , false },
4550 {"gpt-4o" , "gpt-4o" , false },
@@ -51,6 +56,11 @@ func TestIsOpenAIReasoningModel(t *testing.T) {
5156 {"gpt-3.5-turbo" , "gpt-3.5-turbo" , false },
5257 {"gpt-3.5-turbo-16k" , "gpt-3.5-turbo-16k" , false },
5358
59+ // O1-pro series models - should support reasoning
60+ {"o1-pro" , "o1-pro" , true },
61+ {"o1-pro-2025-03-19" , "o1-pro-2025-03-19" , true },
62+ {"O1-PRO uppercase" , "O1-PRO" , true },
63+
5464 // Other models - should NOT support reasoning
5565 {"text-davinci-003" , "text-davinci-003" , false },
5666 {"gpt-3" , "gpt-3" , false },
@@ -70,6 +80,44 @@ func TestIsOpenAIReasoningModel(t *testing.T) {
7080 }
7181}
7282
83+ func TestSupportsReasoningSummary (t * testing.T ) {
84+ t .Parallel ()
85+
86+ tests := []struct {
87+ name string
88+ model string
89+ expected bool
90+ }{
91+ // Standard reasoning models - should support summary
92+ {"o1-preview" , "o1-preview" , true },
93+ {"o1-mini" , "o1-mini" , true },
94+ {"o3-mini" , "o3-mini" , true },
95+ {"o4-preview" , "o4-preview" , true },
96+ {"gpt-5" , "gpt-5" , true },
97+ {"gpt-5-mini" , "gpt-5-mini" , true },
98+
99+ // o1-pro models - do NOT support summary
100+ {"o1-pro" , "o1-pro" , false },
101+ {"o1-pro-2025-03-19" , "o1-pro-2025-03-19" , false },
102+ {"O1-PRO uppercase" , "O1-PRO" , false },
103+
104+ // Non-reasoning models - do NOT support summary
105+ {"gpt-4o" , "gpt-4o" , false },
106+ {"gpt-4-turbo" , "gpt-4-turbo" , false },
107+ {"gpt-5-chat-latest" , "gpt-5-chat-latest" , false },
108+ {"empty string" , "" , false },
109+ }
110+
111+ for _ , tt := range tests {
112+ t .Run (tt .name , func (t * testing.T ) {
113+ t .Parallel ()
114+
115+ result := supportsReasoningSummary (tt .model )
116+ assert .Equal (t , tt .expected , result , "Model %s should return %v" , tt .model , tt .expected )
117+ })
118+ }
119+ }
120+
73121func TestGetOpenAIReasoningEffort_Success (t * testing.T ) {
74122 t .Parallel ()
75123
0 commit comments