Compare commits

...

2 Commits

Author SHA1 Message Date
vibe-code 6edb40d01e chore: 临时 80w 限额覆盖用于撞墙验证(验证后移除) 2026-08-13 03:21:22 +00:00
vibe-code 8a6416f28f feat: 前置闸门预计算输入 token 增加 DEBUG 日志 2026-08-13 03:21:22 +00:00
+9
View File
@@ -163,6 +163,9 @@ HARD_DAILY_LIMITS = {
# 请求前闸门(async_pre_call_hook)已不滞后 → 无需打折(旧 1.8M/480 万为 post-hoc 时代遗产)。
# 统一 2M,余额相关的动态限额由 balance_at_sync - (usage_now - usage_at_sync) 实时。
"__DEFAULT__": 2_000_000,
# ⚠️ TEMP: 撞墙验证临时覆盖(2026-08-13,验证后删除本条)。
# 降到 80w 模拟余额墙;验证后先改 1_000_000 二次验证,再删除恢复 2M。
"deepseek-v4-flash-ga-260731": 800_000,
}
# ==========================================
@@ -852,6 +855,12 @@ class DailyLimitHandler(CustomLogger):
reserve = input_tokens + max_out
if DEBUG_MODE:
log(
f"🔍 Pre-reserve {data['model']}: input={int(input_tokens):,} + max_out={int(max_out):,} = reserve={int(reserve):,}",
level="DEBUG",
)
blocked = _check_request_block(data["model"], reserve=reserve)
if not blocked:
return None