refactor: simplify model prefix checks and update message role for o-series models

This commit is contained in:
CaIon
2025-04-17 16:50:52 +08:00
parent 995c19a997
commit ee4f27d01b
3 changed files with 11 additions and 11 deletions

View File

@@ -186,7 +186,7 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
return testRequest
}
// 并非Embedding 模型
if strings.HasPrefix(model, "o1") || strings.HasPrefix(model, "o3") {
if strings.HasPrefix(model, "o") {
testRequest.MaxCompletionTokens = 10
} else if strings.Contains(model, "thinking") {
if !strings.Contains(model, "claude") {