feat: sync deployed v1.0.0-rc.38-custom.42

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 aa6c3f50f4
commit ceddfd3d6b
828 files changed
+122253 -13702

No files matched your search

+12
View File
@@ -8,6 +8,7 @@ import (
relaycommon "github.com/QuantumNous/new-api/relay/common"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -205,3 +206,14 @@ func TestProcessHeaderOverride_PassHeadersTemplateSetsRuntimeHeaders(t *testing.
require.Equal(t, "sess-123", upstreamReq.Header.Get("Session_id"))
require.Empty(t, upstreamReq.Header.Get("X-Codex-Beta-Features"))
}
func TestToWebSocketURL(t *testing.T) {
for input, want := range map[string]string{
"https://api.openai.com/v1/responses": "wss://api.openai.com/v1/responses",
"http://127.0.0.1:3000/v1/responses": "ws://127.0.0.1:3000/v1/responses",
"wss://chatgpt.com/backend-api/codex/responses": "wss://chatgpt.com/backend-api/codex/responses",
"ws://127.0.0.1:3000/backend-api/codex/responses": "ws://127.0.0.1:3000/backend-api/codex/responses",
} {
assert.Equal(t, want, toWebSocketURL(input), input)
}
}