feat: sync deployed v1.0.0-rc.38-custom.42
Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 1m40s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 42m16s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s

Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
cneicy committed 2026-09-26 04:49:11 +08:00
1 parent c2b44332d6
commit a5f7b8e586
828 files changed
+122253 -13702

No files matched your search

+16
View File
@@ -1,6 +1,8 @@
package router
import (
"strings"
"github.com/QuantumNous/new-api/constant"
"github.com/QuantumNous/new-api/controller"
"github.com/QuantumNous/new-api/middleware"
@@ -70,6 +72,11 @@ func SetRelayRouter(router *gin.Engine) {
relayV1Router.Use(middleware.RouteTag("relay"))
relayV1Router.Use(middleware.SystemPerformanceCheck())
relayV1Router.Use(middleware.TokenAuth())
{
// Responses WebSocket route. Channel selection happens after the first
// response.create event; each event runs the ordinary request limiter.
relayV1Router.GET("/responses", controller.ResponsesWebSocket)
}
relayV1Router.Use(middleware.ModelRequestRateLimit())
{
// WebSocket 路由(统一到 Relay)
@@ -181,6 +188,15 @@ func SetRelayRouter(router *gin.Engine) {
//relayMjRouter.Use()
relayGeminiRouter := router.Group("/v1beta")
// :countTokens is not implemented. Answer it like an unregistered route
// before auth/channel selection instead of silently relaying it as
// generateContent (#7283).
relayGeminiRouter.Use(func(c *gin.Context) {
if strings.HasSuffix(c.Request.URL.Path, ":countTokens") {
controller.RelayNotFound(c)
c.Abort()
}
})
relayGeminiRouter.Use(middleware.RouteTag("relay"))
relayGeminiRouter.Use(middleware.SystemPerformanceCheck())
relayGeminiRouter.Use(middleware.TokenAuth())