fix(go): accept empty/unknown model_type when adding provider models (#17653)

This commit is contained in:
euvre
2026-08-04 11:02:40 +08:00
committed by GitHub
parent 1c59a4f150
commit a6da1a05e8
4 changed files with 124 additions and 20 deletions

View File

@@ -727,11 +727,6 @@ func (h *ProviderHandler) AddModel(c *gin.Context) {
return
}
if len(req.ModelTypes) == 0 {
common.ResponseWithHttpCodeData(c, http.StatusBadRequest, common.CodeBadRequest, nil, "model_type is required")
return
}
userID := c.GetString("user_id")
ctx := c.Request.Context()