Go: add new provider minimax (#14296)

### What problem does this PR solve?

1. Add new provider minimax
2. Add new command: CHECK INSTANCE 'instance_name' FROM 'provider_name';
```
RAGFlow(user)> check instance 'test' from 'minimax';
SUCCESS
```

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-04-23 10:16:20 +08:00
committed by GitHub
parent 387e2903d3
commit 2b029882d7
22 changed files with 549 additions and 197 deletions

View File

@@ -393,6 +393,43 @@ func (h *ProviderHandler) ShowInstanceBalance(c *gin.Context) {
})
}
func (h *ProviderHandler) CheckProviderConnection(c *gin.Context) {
providerName := c.Param("provider_name")
if providerName == "" {
c.JSON(http.StatusBadRequest, gin.H{
"code": 400,
"message": "Provider name is required",
})
return
}
instanceName := c.Param("instance_name")
if instanceName == "" {
c.JSON(http.StatusBadRequest, gin.H{
"code": 400,
"message": "Instance name is required",
})
return
}
userID := c.GetString("user_id")
// Get tenant ID from user
errorCode, err := h.modelProviderService.CheckProviderConnection(providerName, instanceName, userID)
if err != nil {
c.JSON(http.StatusOK, gin.H{
"code": errorCode,
"message": err.Error(),
})
return
}
c.JSON(http.StatusOK, gin.H{
"code": 0,
"message": "success",
})
}
type AlterProviderInstanceRequest struct {
LLMName string `json:"llm_name" binding:"required"`
}