Harden composite group product surfaces

This commit is contained in:
Heatherm Huang
2026-07-23 09:19:25 +08:00
parent ebc1028771
commit c8d1e2e16f
20 changed files with 570 additions and 45 deletions
@@ -76,6 +76,10 @@ func (h *GatewayHandler) Responses(c *gin.Context) {
}
reqModel := modelResult.String()
ensureCompositeTargetPlatform(c, apiKey, reqModel)
if !compositeTargetPlatformResolved(c, apiKey, reqModel) {
h.responsesErrorResponse(c, http.StatusBadRequest, "invalid_request_error", "Model is not supported by composite groups")
return
}
reqStream, ok := parseOpenAICompatibleStream(body)
if !ok {
h.responsesErrorResponse(c, http.StatusBadRequest, "invalid_request_error", invalidStreamFieldTypeMessage)