fix: 收窄 OpenAI o 系列模型适配范围 (#5293)

* fix: 收窄 OpenAI o 系列模型适配范围

* fix(openai): 限制 gpt-5 适配仅作用于 OpenAI 模型

* fix(openai): narrow o-series reasoning model detection

---------

Co-authored-by: Seefs <i@seefs.me>
This commit is contained in:
Don Ganesh
2026-06-05 12:12:45 +08:00
committed by GitHub
parent 189913b7a0
commit 01c2128e23
4 changed files with 42 additions and 6 deletions
+1 -1
View File
@@ -814,7 +814,7 @@ func buildTestRequest(model string, endpointType string, channel *model.Channel,
testRequest.StreamOptions = &dto.StreamOptions{IncludeUsage: true}
}
if strings.HasPrefix(model, "o") {
if dto.IsOpenAIReasoningOModel(model) {
testRequest.MaxCompletionTokens = lo.ToPtr(uint(16))
} else if strings.Contains(model, "thinking") {
if !strings.Contains(model, "claude") {