fix(openai): strip residual input namespaces before HTTP forwarding

This commit is contained in:
scp-planet committed 2026-07-24 02:59:32 +08:00
1 parent cb24522dd5
commit e70fbf3204
6 files changed
+157 -2

No files matched your search

@@ -71,6 +71,14 @@ func (s *OpenAIGatewayService) Forward(ctx context.Context, c *gin.Context, acco
}})
return nil, err
}
body, err = stripOpenAIResponsesInputNamespaces(body)
if err != nil {
setOpsUpstreamError(c, http.StatusBadRequest, err.Error(), "")
c.JSON(http.StatusBadRequest, gin.H{"error": gin.H{
"type": "invalid_request_error", "message": err.Error(), "param": "input",
}})
return nil, err
}
}
originalBody := body