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

This commit is contained in:
Nekohy
2025-08-12 21:37:12 +08:00
parent f5abbeb353
commit 33925dd313

View File

@@ -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
} }
} }
} }
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") {