fix: preserve explicit zero values in native relay requests

This commit is contained in:
Seefs
2026-03-01 15:47:03 +08:00
parent e22f59e449
commit 2cf3c1836c
52 changed files with 523 additions and 232 deletions
+2 -1
View File
@@ -21,6 +21,7 @@ import (
"github.com/QuantumNous/new-api/types"
"github.com/gin-gonic/gin"
"github.com/samber/lo"
)
const (
@@ -56,7 +57,7 @@ func (a *Adaptor) ConvertAudioRequest(c *gin.Context, info *relaycommon.RelayInf
}
voiceType := mapVoiceType(request.Voice)
speedRatio := request.Speed
speedRatio := lo.FromPtrOr(request.Speed, 0.0)
encoding := mapEncoding(request.ResponseFormat)
c.Set(contextKeyResponseFormat, encoding)