mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-19 16:17:56 +00:00
feat(grok): free 档本地用量软门禁与支付失败临时下线
对明确 free 的 OAuth 账号在调度路径应用可配置用量窗口门禁(统计失败 fail-open)。 402 payment required / 消费上限类 403 继续临时移出调度,管理端探测不走门禁。
This commit is contained in:
@@ -440,6 +440,15 @@ gateway:
|
||||
failure_threshold: 2
|
||||
window_seconds: 60
|
||||
ttl_seconds: 600
|
||||
# Grok free-tier local soft gate (scheduler filter only; admin QueryQuota/import probe bypasses it).
|
||||
# Enabled by default because free detection requires an explicit subscription_tier/plan_type of "free".
|
||||
# Stats/query failures fail open so DB issues do not block all Grok traffic.
|
||||
grok:
|
||||
free_quota_soft_gate_enabled: true
|
||||
free_quota_token_limit: 2000000
|
||||
free_quota_soft_gate_percent: 95
|
||||
free_quota_window_hours: 24
|
||||
free_quota_stats_cache_seconds: 5
|
||||
# HTTP upstream connection pool settings (HTTP/2 + multi-proxy scenario defaults)
|
||||
# HTTP 上游连接池配置(HTTP/2 + 多代理场景默认值)
|
||||
# Max idle connections across all hosts
|
||||
|
||||
Reference in New Issue
Block a user