mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 04:03:18 +00:00
fix: ensure reasoning is not nil before setting effort in OpenAI responses
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user