Repository navigation
routing: 「Weekly pace」|「重置前用完」中文名改为「额度均衡」,使中文更清楚直观 #951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pc418
wants to merge
3
commits into
yetone:main
Choose a base branch
from
pc418:pace-wording
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -281,7 +281,7 @@ | |
| order: ["In order", "In order: the first answers everything until it can't; then the next."], | ||
| rotate: ["In turn", "In turn: each conversation's next turn goes to the account after the one that answered its last, and a new conversation starts one further along; the requests within a turn stay put, keeping the prompt cache."], | ||
| usage: ["Least used", "Least used first: the account with the most of its allowance left goes first; a key by the tokens magpie sent it lately."], | ||
| pace: ["Weekly pace", "Weekly pace: the account with the most of its week left per hour until it renews goes first — the one with the most to lose at its reset; an account with five hours and no week by what its five hours have left per hour. One at 90% or more waits until the others can't answer; a key by the tokens magpie sent it lately."], | ||
| pace: ["Weekly pace", "Weekly pace: uses each account's week up evenly until it renews — the most of its week left per hour first — so later five-hour windows still have several accounts; one with five hours and no week goes by its five hours. One at 90% or more waits until the others can't answer; a key by the tokens magpie sent it lately."], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 原意更清楚,相信opus 5.5,copilot是gpt不会写文。前文短句更多好阅读,后文要到per hour再想想才知道意思 |
||
| manual: ["Manual", "Manual: every request goes to the model picked on the group's card, over its own accounts or keys."], | ||
| }; | ||
| const GROUP_ORDER = "In order: member by member, the first model the group names until it can't answer, each over its own accounts or keys as its provider routes them."; | ||
|
|
@@ -2470,7 +2470,7 @@ | |
| order: "In order: the first model until it can't answer, then the next — each over its own accounts or keys as its provider routes them.", | ||
| rotate: "In turn: each conversation's next turn goes to the next member's account or key, spreading the load.", | ||
| usage: "Least used first: the account or key with the most of its allowance left goes first.", | ||
| pace: "Weekly pace: the account with the most of its week left per hour until it renews goes first, so less of each member's week is lost at its reset — an account with five hours and no week (Claude Enterprise) by what its five hours have left per hour until they renew, so almost always first; a key by the tokens magpie sent it lately.", | ||
| pace: "Weekly pace: uses each member's week up evenly until it renews — the most of its week left per hour first — so later five-hour windows still have several accounts. One with five hours and no week (Claude Enterprise) goes by its five hours, so almost always first; a key by the tokens magpie sent it lately.", | ||
| manual: "Manual: every request goes to the model you pick on the group's card, over its own accounts or keys; the others, and the rules, wait until you pick another — none takes over when it fails.", | ||
| }; | ||
| // a group in the group is routed by its own routing, whatever this one's | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,7 +160,7 @@ <h2 id="routing"><a class="anchor" href="#routing">3 · 可选:路由组</a></ | |
| </figure> | ||
|
|
||
| <h3>一个供应商里的多个账号或密钥</h3> | ||
| <p>展开供应商那一行,勾选要用的每个账号或密钥。<span class="ui">路由</span> 决定请求怎么分给它们:<span class="ui">智能</span>(默认)、<span class="ui">按顺序</span>、<span class="ui">轮流</span>、<span class="ui">用量少的优先</span> 或 <span class="ui">重置前用完</span>。<span class="ui">备用</span> 里列出这个供应商额度用完、被限流或不可用时改用的模型。</p> | ||
| <p>展开供应商那一行,勾选要用的每个账号或密钥。<span class="ui">路由</span> 决定请求怎么分给它们:<span class="ui">智能</span>(默认)、<span class="ui">按顺序</span>、<span class="ui">轮流</span>、<span class="ui">用量少的优先</span> 或 <span class="ui">额度均衡</span>。<span class="ui">备用</span> 里列出这个供应商额度用完、被限流或不可用时改用的模型。</p> | ||
|
|
||
| <h3>跨供应商的同一个模型</h3> | ||
| <p>路由组是几个模型(来自一个或多个供应商),Agent 把它当作一个来选:<code>group/<id></code>,在选择列表的 <em>路由组</em> 下面。两个供应商用同一个名字提供的模型会自动成组;在 <span class="ui">路由</span> 标签页点 <span class="ui">新建组</span> 可以把任意模型组到一起。排第一的模型决定这个组对外的能力。</p> | ||
|
|
@@ -171,7 +171,7 @@ <h3>跨供应商的同一个模型</h3> | |
| <tr><td>按顺序 <code>order</code></td><td>先用第一个模型,它答不了再换下一个。</td></tr> | ||
| <tr><td>轮流 <code>rotate</code></td><td>会话的每一轮交给下一个成员的账号或 Key,均摊负载。</td></tr> | ||
| <tr><td>最少使用 <code>usage</code></td><td>剩余额度最多的账号或 Key 排第一。</td></tr> | ||
| <tr><td>重置前用完 <code>pace</code></td><td>每周剩余额度除以距重置的小时数,最高的账号排第一——重置时损失最多的那个——少让成员的周额度到重置时作废;只有 5 小时额度、没有周额度的账号(如 Claude Enterprise)按 5 小时窗口的剩余额度除以距它重置的小时数算,所以几乎总排第一。用到 90% 以上的等其他账号都答不了时才用。Key 按最近发给它的 token 数排。</td></tr> | ||
| <tr><td>额度均衡 <code>pace</code></td><td>根据剩余周额度和重置时间分配使用,避免过早耗尽某个账号的周额度,让后续更多个 5 小时窗口仍有多个账号可用。只有 5 小时额度、没有周额度的账号(如 Claude Enterprise)按 5 小时窗口同样计算,所以几乎总排第一。用到 90% 以上的等其他账号都答不了时才用。Key 按最近发给它的 token 数排。</td></tr> | ||
| </table></div> | ||
| <div class="table-wrap"><table> | ||
| <tr><th>会话保持</th><th>会话在回答过它的账号或 Key 上留多久</th></tr> | ||
|
|
@@ -194,7 +194,7 @@ <h3 id="nested">路由组里放路由组</h3> | |
| <p>路由组的成员也可以是另一个路由组:在 <span class="ui">添加模型</span> 的 <em>路由组</em> 分类里选它,或者在终端里用 <code>models+=group/<id></code>。子组占据它在顺序里的位置,在自己的模型之间按自己的路由方式和规则分配。比如 Coder 可以是 <code>deepseek-v4-pro</code>,然后是 <em>Fast</em>,而 Fast 是几个便宜模型的顺序。Coder 的规则可以把一轮对话交给 <code>group/fast</code>,再由 Fast 自己的规则决定它里面哪个模型排第一。</p> | ||
| <ul> | ||
| <li><b>不会无限递归。</b>一个组不能包含它自己,无论是直接包含,还是经由它里面的组间接包含。Coder 已经包含 Fast 时,再把 Coder 放进 Fast 会被拒绝,选择器里也不会列出这样的组。最多嵌套 8 层。一个组被别的组包含时不能删除,要先从那个组里移除它。</li> | ||
| <li><b>每一层按自己的路由。</b>外层组不管用什么路由,都不会伸进它里面的组:智能、轮流、最少使用、重置前用完都把子组当作一个成员,拿子组自己会先用的那个账号或 Key 来比;排到它时,子组按自己的顺序整体尝试。Coder 设为智能、里面放 Claude(按顺序)和 GPT(按顺序)两个组时,比较的是 Claude 组的第一个和 GPT 组的第一个,不会把两组的账号混在一起排。</li> | ||
| <li><b>每一层按自己的路由。</b>外层组不管用什么路由,都不会伸进它里面的组:智能、轮流、最少使用、额度均衡都把子组当作一个成员,拿子组自己会先用的那个账号或 Key 来比;排到它时,子组按自己的顺序整体尝试。Coder 设为智能、里面放 Claude(按顺序)和 GPT(按顺序)两个组时,比较的是 Claude 组的第一个和 GPT 组的第一个,不会把两组的账号混在一起排。</li> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 最少使用是特定选项 |
||
| <li><b>故障转移照常。</b>子组里的模型全部失败时,由外层组的下一个成员接手,和其他成员一样。</li> | ||
| <li>同一个模型出现两次(单独一次,子组里一次)时只问一次,按它第一次出现的位置。</li> | ||
| </ul> | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
就是在说每周均衡而非账号的均衡,后者是最少使用