feat: add configurable account selection strategies
Refactor account selection into a strategy pattern with three options: - Sticky: cache-optimized, stays on same account until rate-limited - Round-robin: load-balanced, rotates every request - Hybrid (default): smart distribution using health scores, token buckets, and LRU The hybrid strategy uses multiple signals for optimal account selection: health tracking for reliability, client-side token buckets for rate limiting, and LRU freshness to prefer rested accounts. Includes WebUI settings for strategy selection and unit tests. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
8
src/account-manager/strategies/trackers/index.js
Normal file
8
src/account-manager/strategies/trackers/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Trackers Index
|
||||
*
|
||||
* Exports all tracker classes for account selection strategies.
|
||||
*/
|
||||
|
||||
export { HealthTracker } from './health-tracker.js';
|
||||
export { TokenBucketTracker } from './token-bucket-tracker.js';
|
||||
Reference in New Issue
Block a user