فهرست منبع

fix: Adjust MaxTokens logic for non-Claude models in test request

1808837298@qq.com 11 ماه پیش
والد
کامیت
73263e02d6
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      controller/channel-test.go

+ 3 - 1
controller/channel-test.go

@@ -187,7 +187,9 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
 	if strings.HasPrefix(model, "o1") || strings.HasPrefix(model, "o3") {
 		testRequest.MaxCompletionTokens = 10
 	} else if strings.Contains(model, "thinking") {
-		testRequest.MaxTokens = 50
+		if !strings.Contains(model, "claude") {
+			testRequest.MaxTokens = 50
+		}
 	} else {
 		testRequest.MaxTokens = 10
 	}