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

+18
View File
@@ -59,10 +59,14 @@ const (
ChannelTypeSub2API = 59
ChannelTypeNewAPI = 60
ChannelTypeTaskPlugin = 61
ChannelTypeVLLM = 62
ChannelTypeSGLang = 63
ChannelTypeDummy // this one is only for count, do not add any channel after this
)
// ChannelBaseURLs 保存各渠道类型的内置默认 Base URL。
// 非空值会通过 /api/channel/default_base_urls 下发到前端,作为渠道表单的 API 地址占位提示。
var ChannelBaseURLs = []string{
"", // 0
"https://api.openai.com", // 1
@@ -126,6 +130,8 @@ var ChannelBaseURLs = []string{
"", //59
"", //60
"", //61
"", //62
"", //63
}
func GetChannelBaseURL(channelType int) string {
@@ -194,6 +200,8 @@ var ChannelTypeNames = map[int]string{
ChannelTypeSub2API: "Sub2API",
ChannelTypeNewAPI: "New API",
ChannelTypeTaskPlugin: "Task Plugin",
ChannelTypeVLLM: "vLLM",
ChannelTypeSGLang: "SGLang",
}
func GetChannelTypeName(channelType int) string {
@@ -226,3 +234,13 @@ var ChannelSpecialBases = map[string]ChannelSpecialBase{
OpenAIBaseURL: "https://ark.cn-beijing.volces.com/api/coding/v3",
},
}
// IsAdvancedCustomChannel includes named channels backed by route presets.
func IsAdvancedCustomChannel(channelType int) bool {
switch channelType {
case ChannelTypeAdvancedCustom, ChannelTypeVLLM, ChannelTypeSGLang:
return true
default:
return false
}
}