feat: ShouldPreserveThinkingSuffix (#2189)

This commit is contained in:
Seefs
2025-11-07 17:43:33 +08:00
committed by GitHub
parent 2b469c6323
commit fd55ba7f2c
14 changed files with 138 additions and 19 deletions
+3 -1
View File
@@ -67,7 +67,9 @@ func ClaudeHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *typ
request.TopP = 0
request.Temperature = common.GetPointer[float64](1.0)
}
request.Model = strings.TrimSuffix(request.Model, "-thinking")
if !model_setting.ShouldPreserveThinkingSuffix(info.OriginModelName) {
request.Model = strings.TrimSuffix(request.Model, "-thinking")
}
info.UpstreamModelName = request.Model
}