fix: improve error messaging and JSON schema handling in distributor and relay components

This commit is contained in:
CaIon
2025-07-26 12:11:20 +08:00
parent 1297addfb1
commit 2469c439b1
4 changed files with 22 additions and 16 deletions

View File

@@ -175,6 +175,9 @@ func TextHelper(c *gin.Context) (newAPIError *types.NewAPIError) {
if err != nil {
return types.NewErrorWithStatusCode(err, types.ErrorCodeReadRequestBodyFailed, http.StatusBadRequest)
}
if common.DebugEnabled {
println("requestBody: ", string(body))
}
requestBody = bytes.NewBuffer(body)
} else {
convertedRequest, err := adaptor.ConvertOpenAIRequest(c, relayInfo, textRequest)