feat: add DisableCooling configuration to manage quota cooldown behavior

This commit is contained in:
Luis Pater
2025-10-21 21:51:30 +08:00
parent 243bf5c108
commit 9678be7aa4
5 changed files with 40 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import (
"github.com/router-for-me/CLIProxyAPI/v6/internal/usage"
"github.com/router-for-me/CLIProxyAPI/v6/internal/util"
sdkAuth "github.com/router-for-me/CLIProxyAPI/v6/sdk/auth"
coreauth "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/auth"
log "github.com/sirupsen/logrus"
)
@@ -377,6 +378,7 @@ func main() {
}
}
usage.SetStatisticsEnabled(cfg.UsageStatisticsEnabled)
coreauth.SetQuotaCooldownDisabled(cfg.DisableCooling)
if err = logging.ConfigureLogOutput(cfg.LoggingToFile); err != nil {
log.Fatalf("failed to configure log output: %v", err)