feat: add specific hard limits and log format
This commit is contained in:
+6
-4
@@ -120,11 +120,12 @@ VOLC_MANAGED_PAIRS = set()
|
||||
# Format: "clean-model-name": limit_in_tokens
|
||||
# Or with hash: "clean-model-name:hash": limit_in_tokens
|
||||
HARD_DAILY_LIMITS = {
|
||||
# 示例 Examples:
|
||||
"doubao-seed-code-preview-251028": 5_000_000,
|
||||
"deepseek-v3-2-251201": 1_600_000,
|
||||
# 特定模型硬限额
|
||||
"doubao-seed-code-preview-251028": 4_800_000,
|
||||
# 通用模型硬限额
|
||||
"doubao-seed-1-8-251228": 1_800_000,
|
||||
"glm-4-7-251222": 1_800_000,
|
||||
"deepseek-v3-2-251201": 1_800_000,
|
||||
}
|
||||
|
||||
# ==========================================
|
||||
@@ -545,8 +546,9 @@ class DailyLimitHandler(CustomLogger):
|
||||
print(f"DEBUG: Dynamic key not found: {dynamic_key}")
|
||||
|
||||
key_display = key.split(":", 2)[-1]
|
||||
limit_str = f"/{int(effective_limit):,}" if effective_limit else ""
|
||||
log(
|
||||
f"📊 [Usage] {key_display}: +{total_tokens} (Today: {current_total:,}{rem_display})",
|
||||
f"📊 [Usage] {key_display}: +{total_tokens} (Today: {current_total:,}{limit_str}{rem_display})",
|
||||
level="INFO",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user