Skip to content

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

cloud: set the proxy content-type to the same as local models (#12759)

Patrick Devineb97eb2b85850
diff --git a/server/routes.go b/server/routes.go
index f1770cb70..3d32a9aad 100644
--- a/server/routes.go
+++ b/server/routes.go
@@ -289,6 +289,12 @@ func (s *Server) GenerateHandler(c *gin.Context) {
return
}
+ contentType := "application/json; charset=utf-8"
+ if req.Stream != nil && *req.Stream {
+ contentType = "application/x-ndjson"
+ }
+ c.Header("Content-Type", contentType)
+
return
}
@@ -1932,6 +1938,12 @@ func (s *Server) ChatHandler(c *gin.Context) {
return
}
+ contentType := "application/json; charset=utf-8"
+ if req.Stream != nil && *req.Stream {
+ contentType = "application/x-ndjson"
+ }
+ c.Header("Content-Type", contentType)
+
return
}