From ce77f25576f6858ebae4bf1517edbf5d002524b3 Mon Sep 17 00:00:00 2001 From: "1808837298@qq.com" <1808837298@qq.com> Date: Mon, 3 Feb 2025 14:23:26 +0800 Subject: [PATCH] fix: update reasoning effort model suffix parsing - Modify model suffix parsing to use hyphen-separated suffixes - Ensure consistent parsing of `-high`, `-medium`, and `-low` reasoning effort indicators --- relay/channel/openai/adaptor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/relay/channel/openai/adaptor.go b/relay/channel/openai/adaptor.go index 2de611b7..7e718624 100644 --- a/relay/channel/openai/adaptor.go +++ b/relay/channel/openai/adaptor.go @@ -117,11 +117,11 @@ func (a *Adaptor) ConvertRequest(c *gin.Context, info *relaycommon.RelayInfo, re if strings.HasPrefix(request.Model, "o3") { request.Temperature = nil } - if strings.HasSuffix(request.Model, "high") { + if strings.HasSuffix(request.Model, "-high") { request.ReasoningEffort = "high" - } else if strings.HasSuffix(request.Model, "low") { + } else if strings.HasSuffix(request.Model, "-low") { request.ReasoningEffort = "low" - } else if strings.HasSuffix(request.Model, "medium") { + } else if strings.HasSuffix(request.Model, "-medium") { request.ReasoningEffort = "medium" } }