revert: remove hardcoded daily limits, restoring dynamic calculation only

This commit is contained in:
kim
2026-01-30 00:05:40 +08:00
parent d5b8829265
commit dd8cbe5f63
+10 -8
View File
@@ -120,12 +120,11 @@ VOLC_MANAGED_PAIRS = set()
# Format: "clean-model-name": limit_in_tokens # Format: "clean-model-name": limit_in_tokens
# Or with hash: "clean-model-name:hash": limit_in_tokens # Or with hash: "clean-model-name:hash": limit_in_tokens
HARD_DAILY_LIMITS = { HARD_DAILY_LIMITS = {
# 特定模型硬限额 # 示例 Examples:
"doubao-seed-code-preview-251028": 4_800_000, # "doubao-pro-32k": 10_000_000, # Limit Doubao Pro to 10M tokens/day
# 通用模型硬限额 # "deepseek-v3": 5_000_000, # Limit DeepSeek V3 to 5M tokens/day
"doubao-seed-1-8-251228": 1_800_000, # Specific endpoint limit / 特定端点限额
"glm-4-7-251222": 1_800_000, # "deepseek-v3-2-251201:ba0383d3": 1_600_000,
"deepseek-v3-2-251201": 1_800_000,
} }
# ========================================== # ==========================================
@@ -546,9 +545,12 @@ class DailyLimitHandler(CustomLogger):
print(f"DEBUG: Dynamic key not found: {dynamic_key}") print(f"DEBUG: Dynamic key not found: {dynamic_key}")
key_display = key.split(":", 2)[-1] key_display = key.split(":", 2)[-1]
limit_str = f"/{int(effective_limit):,}" if effective_limit else "" # Display Limit clearly
limit_str = (
f" | Limit: {int(effective_limit):,}" if effective_limit else ""
)
log( log(
f"📊 [Usage] {key_display}: +{total_tokens} (Today: {current_total:,}{limit_str}{rem_display})", f"📊 [Usage] {key_display}: +{total_tokens} (Today: {current_total:,}{rem_display}{limit_str})",
level="INFO", level="INFO",
) )