AIStudio2API icon indicating copy to clipboard operation
AIStudio2API copied to clipboard

feat: 支持最少使用优先(least-used)账户路由策略 / Add least-used account routing strategy

Open wowie1012 opened this issue 1 week ago • 1 comments

想要什么,用来做什么 / What you want and what for

希望在 ROUTING_STRATEGY 中增加 least-used(最少使用优先)策略,或在重启后保留 round-robin 的游标位置。

目前的情况:

  • round-robin 每次重启后都会从按字母排序的第一个账户重新开始,导致列表靠前的几个账户(以及常驻的 Warm Worker)承担了大部分请求,后面的账户很少被用到。
  • 如果有较多账户,希望能优先分配近期请求数或消耗 token 最少的可用账户,让各账户的配额使用更均衡,减少单个账户频繁触发限流或配额耗尽。

Requesting a least-used option for ROUTING_STRATEGY (or persisting the round-robin cursor across restarts).

Current behavior:

  • round-robin resets its cursor on restart and starts from the first account alphabetically, so the first few accounts in the list (and their warm workers) receive most of the traffic while later accounts stay idle.
  • With many accounts configured, routing to the eligible account with the fewest recent requests/tokens would balance quota usage more evenly.

版本 / Version

v0.3.14

wowie1012 avatar Nov 23 '26 10:11 wowie1012

it's fixed in v0.3.15

Mag1cFall avatar Nov 25 '26 07:11 Mag1cFall