Skip to content

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

server: loosen thinking level constraint (#14625)

Parth Sareen122c68c151c8
diff --git a/server/routes.go b/server/routes.go
index 7a872a8e0..271b357f9 100644
--- a/server/routes.go
+++ b/server/routes.go
@@ -370,12 +370,6 @@ func (s *Server) GenerateHandler(c *gin.Context) {
}
}
- // Validate Think value: string values currently only allowed for harmony/gptoss models
- if req.Think != nil && req.Think.IsString() && m.Config.Parser != "harmony" {
- c.JSON(http.StatusBadRequest, gin.H{"error": fmt.Sprintf("think value %q is not supported for this model", req.Think.String())})
- return
- }
-
caps := []model.Capability{model.CapabilityCompletion}
if req.Suffix != "" {
caps = append(caps, model.CapabilityInsert)
@@ -2240,12 +2234,6 @@ func (s *Server) ChatHandler(c *gin.Context) {
return
}
- // Validate Think value: string values currently only allowed for harmony/gptoss models
- if req.Think != nil && req.Think.IsString() && m.Config.Parser != "harmony" {
- c.JSON(http.StatusBadRequest, gin.H{"error": fmt.Sprintf("think value %q is not supported for this model", req.Think.String())})
- return
- }
-
var thinkingState *thinking.Parser
openingTag, closingTag := thinking.InferTags(m.Template.Template)
if req.Think != nil && req.Think.Bool() && openingTag != "" && closingTag != "" {