fix(billing): 防止余额计费持续透支

This commit is contained in:
wucm667
2026-06-22 10:30:27 +08:00
parent e5f38a6f60
commit 9f5b57fc96
10 changed files with 335 additions and 7 deletions
+4
View File
@@ -1027,6 +1027,10 @@ billing:
# Number of requests to allow in half-open state
# 半开状态允许通过的请求数
half_open_requests: 3
# Conservative minimum balance required before forwarding balance-billed requests.
# Set to 0 to only require balance > 0.
# 余额计费请求转发前要求的保守最小余额;设为 0 则仅要求余额 > 0。
minimum_balance_reserve: 0.000001
# Cache TTL (seconds) for per-user × per-platform quota records
# 用户 × 平台 quota 缓存 TTL(秒),默认 86400=1天,覆盖典型 daily 窗口
user_platform_quota_cache_ttl_seconds: 86400