Fix model name length validation limit

This commit is contained in:
Calcium-Ion
2025-01-05 22:02:46 +08:00
committed by GitHub
parent 4fa7fefe61
commit 4cf9d0787e

View File

@@ -277,7 +277,7 @@ func AddChannel(c *gin.Context) {
// Validate the length of the model name
models := strings.Split(localChannel.Models, ",")
for _, model := range models {
if len(model) > 256 {
if len(model) > 255 {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": fmt.Sprintf("模型名称过长: %s", model),