feat: 前置闸门预计算输入 token 增加 DEBUG 日志
This commit is contained in:
@@ -852,6 +852,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
|
||||
|
||||
Reference in New Issue
Block a user