@@ -934,80 +934,80 @@ func TestCreateChatCompletionStreamWithReasoningModel(t *testing.T) {
934
934
}
935
935
}
936
936
937
- func TestCreateChatCompletionStreamReasoningValidatorFails (t * testing.T ) {
938
- client , _ , _ := setupOpenAITestServer ()
939
-
940
- stream , err := client .CreateChatCompletionStream (context .Background (), openai.ChatCompletionRequest {
941
- MaxTokens : 100 , // This will trigger the validator to fail
942
- Model : openai .O3Mini ,
943
- Messages : []openai.ChatCompletionMessage {
944
- {
945
- Role : openai .ChatMessageRoleUser ,
946
- Content : "Hello!" ,
947
- },
948
- },
949
- Stream : true ,
950
- })
951
-
952
- if stream != nil {
953
- t .Error ("Expected nil stream when validation fails" )
954
- stream .Close ()
955
- }
956
-
957
- if ! errors .Is (err , openai .ErrReasoningModelMaxTokensDeprecated ) {
958
- t .Errorf ("Expected ErrReasoningModelMaxTokensDeprecated, got: %v" , err )
959
- }
960
- }
961
-
962
- func TestCreateChatCompletionStreamO3ReasoningValidatorFails (t * testing.T ) {
963
- client , _ , _ := setupOpenAITestServer ()
964
-
965
- stream , err := client .CreateChatCompletionStream (context .Background (), openai.ChatCompletionRequest {
966
- MaxTokens : 100 , // This will trigger the validator to fail
967
- Model : openai .O3 ,
968
- Messages : []openai.ChatCompletionMessage {
969
- {
970
- Role : openai .ChatMessageRoleUser ,
971
- Content : "Hello!" ,
972
- },
973
- },
974
- Stream : true ,
975
- })
976
-
977
- if stream != nil {
978
- t .Error ("Expected nil stream when validation fails" )
979
- stream .Close ()
980
- }
981
-
982
- if ! errors .Is (err , openai .ErrReasoningModelMaxTokensDeprecated ) {
983
- t .Errorf ("Expected ErrReasoningModelMaxTokensDeprecated for O3, got: %v" , err )
984
- }
985
- }
986
-
987
- func TestCreateChatCompletionStreamO4MiniReasoningValidatorFails (t * testing.T ) {
988
- client , _ , _ := setupOpenAITestServer ()
989
-
990
- stream , err := client .CreateChatCompletionStream (context .Background (), openai.ChatCompletionRequest {
991
- MaxTokens : 100 , // This will trigger the validator to fail
992
- Model : openai .O4Mini ,
993
- Messages : []openai.ChatCompletionMessage {
994
- {
995
- Role : openai .ChatMessageRoleUser ,
996
- Content : "Hello!" ,
997
- },
998
- },
999
- Stream : true ,
1000
- })
1001
-
1002
- if stream != nil {
1003
- t .Error ("Expected nil stream when validation fails" )
1004
- stream .Close ()
1005
- }
1006
-
1007
- if ! errors .Is (err , openai .ErrReasoningModelMaxTokensDeprecated ) {
1008
- t .Errorf ("Expected ErrReasoningModelMaxTokensDeprecated for O4Mini, got: %v" , err )
1009
- }
1010
- }
937
+ // func TestCreateChatCompletionStreamReasoningValidatorFails(t *testing.T) {
938
+ // client, _, _ := setupOpenAITestServer()
939
+ //
940
+ // stream, err := client.CreateChatCompletionStream(context.Background(), openai.ChatCompletionRequest{
941
+ // MaxTokens: 100, // This will trigger the validator to fail
942
+ // Model: openai.O3Mini,
943
+ // Messages: []openai.ChatCompletionMessage{
944
+ // {
945
+ // Role: openai.ChatMessageRoleUser,
946
+ // Content: "Hello!",
947
+ // },
948
+ // },
949
+ // Stream: true,
950
+ // })
951
+ //
952
+ // if stream != nil {
953
+ // t.Error("Expected nil stream when validation fails")
954
+ // stream.Close()
955
+ // }
956
+ //
957
+ // if !errors.Is(err, openai.ErrReasoningModelMaxTokensDeprecated) {
958
+ // t.Errorf("Expected ErrReasoningModelMaxTokensDeprecated, got: %v", err)
959
+ // }
960
+ // }
961
+ //
962
+ // func TestCreateChatCompletionStreamO3ReasoningValidatorFails(t *testing.T) {
963
+ // client, _, _ := setupOpenAITestServer()
964
+ //
965
+ // stream, err := client.CreateChatCompletionStream(context.Background(), openai.ChatCompletionRequest{
966
+ // MaxTokens: 100, // This will trigger the validator to fail
967
+ // Model: openai.O3,
968
+ // Messages: []openai.ChatCompletionMessage{
969
+ // {
970
+ // Role: openai.ChatMessageRoleUser,
971
+ // Content: "Hello!",
972
+ // },
973
+ // },
974
+ // Stream: true,
975
+ // })
976
+ //
977
+ // if stream != nil {
978
+ // t.Error("Expected nil stream when validation fails")
979
+ // stream.Close()
980
+ // }
981
+ //
982
+ // if !errors.Is(err, openai.ErrReasoningModelMaxTokensDeprecated) {
983
+ // t.Errorf("Expected ErrReasoningModelMaxTokensDeprecated for O3, got: %v", err)
984
+ // }
985
+ // }
986
+ //
987
+ // func TestCreateChatCompletionStreamO4MiniReasoningValidatorFails(t *testing.T) {
988
+ // client, _, _ := setupOpenAITestServer()
989
+ //
990
+ // stream, err := client.CreateChatCompletionStream(context.Background(), openai.ChatCompletionRequest{
991
+ // MaxTokens: 100, // This will trigger the validator to fail
992
+ // Model: openai.O4Mini,
993
+ // Messages: []openai.ChatCompletionMessage{
994
+ // {
995
+ // Role: openai.ChatMessageRoleUser,
996
+ // Content: "Hello!",
997
+ // },
998
+ // },
999
+ // Stream: true,
1000
+ // })
1001
+ //
1002
+ // if stream != nil {
1003
+ // t.Error("Expected nil stream when validation fails")
1004
+ // stream.Close()
1005
+ // }
1006
+ //
1007
+ // if !errors.Is(err, openai.ErrReasoningModelMaxTokensDeprecated) {
1008
+ // t.Errorf("Expected ErrReasoningModelMaxTokensDeprecated for O4Mini, got: %v", err)
1009
+ // }
1010
+ // }
1011
1011
1012
1012
func compareChatStreamResponseChoices (c1 , c2 openai.ChatCompletionStreamChoice ) bool {
1013
1013
if c1 .Index != c2 .Index {
0 commit comments