Skip to content

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

server: skip parsing initial <think> if provided in the prompt for /api/generate (#12289)

frob9b8187b48715
diff --git a/server/routes.go b/server/routes.go
index dc868038c..b1def0dea 100644
--- a/server/routes.go
+++ b/server/routes.go
@@ -429,6 +429,9 @@ func (s *Server) GenerateHandler(c *gin.Context) {
OpeningTag: openingTag,
ClosingTag: closingTag,
}
+ if strings.HasSuffix(strings.TrimSpace(prompt), openingTag) {
+ thinkingState.AddContent(openingTag)
+ }
}
}