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

+7 -2
View File
@@ -4,6 +4,11 @@ import (
"github.com/QuantumNous/new-api/types"
)
const (
DefaultCacheRatio = 1.0
DefaultCreateCacheRatio = 1.25
)
var defaultCacheRatio = map[string]float64{
"gemini-3-flash-preview": 0.1,
"gemini-3-pro-preview": 0.1,
@@ -159,7 +164,7 @@ func UpdateCreateCacheRatioByJSONString(jsonStr string) error {
func GetCacheRatio(name string) (float64, bool) {
ratio, ok := cacheRatioMap.Get(name)
if !ok {
return 1, false // Default to 1 if not found
return DefaultCacheRatio, false
}
return ratio, true
}
@@ -167,7 +172,7 @@ func GetCacheRatio(name string) (float64, bool) {
func GetCreateCacheRatio(name string) (float64, bool) {
ratio, ok := createCacheRatioMap.Get(name)
if !ok {
return 1.25, false // Default to 1.25 if not found
return DefaultCreateCacheRatio, false
}
return ratio, true
}