From 368fd75c86aa775a52fcfd6270144213b0c02f2c Mon Sep 17 00:00:00 2001 From: skynono <6811626@qq.com> Date: Mon, 26 May 2025 17:11:45 +0800 Subject: [PATCH] fix: ali parameter.enable_thinking must be set to false for non-streaming calls --- relay/channel/ali/adaptor.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/relay/channel/ali/adaptor.go b/relay/channel/ali/adaptor.go index ab632d22..31e926d6 100644 --- a/relay/channel/ali/adaptor.go +++ b/relay/channel/ali/adaptor.go @@ -57,6 +57,12 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn if request == nil { return nil, errors.New("request is nil") } + + // fix: ali parameter.enable_thinking must be set to false for non-streaming calls + if !info.IsStream { + request.EnableThinking = false + } + switch info.RelayMode { default: aliReq := requestOpenAI2Ali(*request)