Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

server: check for empty tools array too (#5779)

Jeffrey Morgan70b1010fa530
diff --git a/server/routes.go b/server/routes.go
index 347d5221a..c33b71954 100644
--- a/server/routes.go
+++ b/server/routes.go
@@ -1290,7 +1290,7 @@ func (s *Server) ChatHandler(c *gin.Context) {
}
caps := []Capability{CapabilityCompletion}
- if req.Tools != nil {
+ if len(req.Tools) > 0 {
caps = append(caps, CapabilityTools)
}