Commit f249cf9a by CaIon

fix: ensure reasoning is not nil before setting effort in OpenAI responses

parent 5d384fa4
......@@ -537,7 +537,7 @@ func detectImageMimeType(filename string) string {
func (a *Adaptor) ConvertOpenAIResponsesRequest(c *gin.Context, info *relaycommon.RelayInfo, request dto.OpenAIResponsesRequest) (any, error) {
// 转换模型推理力度后缀
effort, originModel := parseReasoningEffortFromModelSuffix(request.Model)
if effort != "" {
if effort != "" && request.Reasoning != nil {
request.Reasoning.Effort = effort
request.Model = originModel
}
......
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