Commit 4a49a80d by Nekohy

fix:Delete the excess ReasoningEffort from the Openrouter OpenAI thinking model.

parent f21353bf
...@@ -237,6 +237,8 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn ...@@ -237,6 +237,8 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
} }
request.Reasoning = marshal request.Reasoning = marshal
} }
// 清空多余的ReasoningEffort
request.ReasoningEffort = ""
} else { } else {
if len(request.Reasoning) == 0 { if len(request.Reasoning) == 0 {
// 适配 OpenAI 的 ReasoningEffort 格式 // 适配 OpenAI 的 ReasoningEffort 格式
...@@ -254,6 +256,7 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn ...@@ -254,6 +256,7 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
} }
} }
} }
request.ReasoningEffort = ""
} }
} }
if strings.HasPrefix(info.UpstreamModelName, "o") || strings.HasPrefix(info.UpstreamModelName, "gpt-5") { if strings.HasPrefix(info.UpstreamModelName, "o") || strings.HasPrefix(info.UpstreamModelName, "gpt-5") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment