Commit Graph

6 Commits

Author SHA1 Message Date
kim 3156bbe431 feat: merge daily_limit functionality into volc_limit_sync for single-file dynamic rate limiting
This commit merges the interception and soft-eviction logic from daily_limit.py into volc_limit_sync.py.
It enables a unified solution where:
1. Running the script directly starts the sync daemon.
2. Importing 'proxy_handler_instance' provides the LiteLLM callback handler.
The handler now respects dynamic limits synced to Redis.
2026-01-29 15:11:14 +08:00
kim 284b33c362 chore: revert changes to daily_limit.py as requested 2026-01-29 14:53:30 +08:00
kim 8630f287b4 feat: add dynamic rate limiting for Volcengine models
This commit introduces a dual-layer rate limiting system:
1. volc_limit_sync.py: A daemon that adaptively syncs Volcengine API balances to Redis based on traffic and safety margins.
2. daily_limit.py: Updated to enforce dynamic limits by checking Redis (Current Usage + Remaining Balance) and handling soft evictions.
2026-01-29 14:51:55 +08:00
root eb7690c0a4 调整日志等级 2026-01-28 18:09:42 +08:00
root 54eb769332 优化hash计算,只取前段,避免url路径影响 2026-01-28 15:13:57 +08:00
root f77f7ba6de 初始化空白分支文件 2026-01-28 14:55:06 +08:00