routing: In turn says each message you send goes round, and draws it (Wing8Aqua on X)

"Each turn of a conversation goes to the next one" read as every message
of a session moving to another account, when a reader expects a new
session to be the unit, and the line was long. What the gateway does
(affinity.go affine): under In turn with Stays on Auto or Within a turn,
each message the user sends ("new-turn") goes to the next account, round
the list; the agent's tool calls for that message stay ("turn"); a new
conversation goes to the one holding fewest. Session and Strict keep a
whole conversation on one, so In turn goes round per conversation; Off
moves every request. Routing is unchanged.

The words now name the unit and the cost: each message you send goes to
the next one, round the list; its tool calls stay; a move costs some
prompt cache; Stays on Session keeps a whole conversation on one. Same
in the provider editor, a group's editor, the Routing plugin's mode
line, the CLI's groups help and the docs (en, zh, ja; llms-full.txt
rebuilt), in en, zh, zh-TW, ja and de.

Under the words, while In turn is picked, a small figure: two
conversations of three messages, a pill naming the account (A, B, C)
each message went to and dots for its tool calls in that account's
shade, drawn as Stays has it now (Auto moves each message, Session one
account a conversation, Off every request). Theme tokens only (--fg-2,
--muted, --faint, --card-2, --line), no colour. The figure lives in
rotfig.js, imported when In turn is first shown; the core keeps a
one-line hook, and its budget goes up 333 for that and the words.

Run (mote, at this tree): rotate-figure.test.cjs, new, provider editor
and group editor, en zh zh-TW ja de, 900px light and 420px dark,
chromium and webkit, 40/40; stays-strict, routing-group-strategy,
routing-save, routing-advanced, rate-limited-sink, group-template,
group-editor-fits, group-editor-align, routing-affinity-order,
routing-affinity-lead, routing-affinity-cache-write,
routing-pool-tooltip, routing-rows-fit, routing-weight-chip,
group-patience, group-defaults, builtins, search-keys, i18n-keys,
i18n-en-no-cjk, text-size, routing-editor-foot, gateway-key-own-rotate,
routing-accounts-narrow all ok; site worker.test.mjs 41/41;
TestCoreScriptBudget ok; go test ./internal/cli ok; gofmt clean; go vet
./internal/cli ./internal/gui darwin, linux -tags nogui, windows ok.
Red, the same on origin/main 5eac086ae (run there on mica):
account-arrange 53 !== 52 (#6010), old-webkit headerpresets.js (#6030)
and :has() in app.css (#5919).
After the rebase onto d6a6865b1, again at this head: TestCoreScriptBudget
ok, rotate-figure 40/40, site node --test 120/120; i18n-keys red only
on main's "No folder" in memory_mcp.go (72facf72e, #6422). Rebased
again onto 1cc7b7267 (a Gateway list label in app.css and i18n.js):
the core budget measured again there, 1,266,252 of 1,266,341; the full
suite runs after the tag.

Broken by hand: the new test against origin/main's assets is red (old
words, no figure); Session drawn like Auto is red (AAABBB expected,
ABCBCA drawn); the hook never drawing the figure is red.

Not tried: the real app (Wails WebKit, WebKitGTK); the figure is a
static SVG, no motion.
This commit is contained in:
yetone
2026-11-13 12:55:57 +08:00
parent 1cc7b7267d
commit c2a1d80fc2
17 changed files with 291 additions and 29 deletions
+2 -1
View File
@@ -104,7 +104,8 @@ const groupUsage = `usage:
order the first model until it can't answer, then the next
drain one account or key until it is used up, then the next, and stays there: an
earlier one that renews meanwhile doesn't take the requests back
rotate each conversation's next turn goes to the next member's account or key
rotate each message you send goes to the next member's account or key, its tool calls
staying with it; with stays=session a whole conversation stays on one
usage the account or key with the most of its allowance left first
pace the account with the most of its week left per hour until it renews first, so less
of a week is lost at its reset
+13
View File
@@ -3679,6 +3679,19 @@ body:not(.side-nav) #addSheet > .row-head.stuck::before { box-shadow: 0 1px 0 va
/* a provider's Routing and Stays, with "unsaved" beside a pick not saved yet */
.route-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.route-pick > .hint { margin: 0; }
/* In turn, drawn (app.js rotateFigure): quiet greys from the theme's own
tokens, an account told by its letter and its shade */
.rot-wrap { margin-top: 8px; max-width: 100%; overflow-x: auto; }
.rot-fig { display: block; max-width: 100%; height: auto; font-family: var(--font); }
.rot-fig .rot-track { fill: var(--card-2); stroke: var(--line); }
.rot-fig .rot-link { stroke: var(--line); stroke-width: 1.5; }
.rot-fig .rot-l { font-size: 9px; font-weight: 600; fill: var(--card); }
.rot-fig .rot-l.rot-c { fill: var(--fg); }
.rot-fig .rot-acct.rot-a, .rot-fig .rot-call.rot-a { fill: var(--fg-2); }
.rot-fig .rot-acct.rot-b, .rot-fig .rot-call.rot-b { fill: var(--muted); }
.rot-fig .rot-acct.rot-c, .rot-fig .rot-call.rot-c { fill: var(--faint); }
.rot-fig .rot-key { fill: none; stroke: var(--muted); }
.rot-fig .rot-legend { font-size: 9.5px; fill: var(--muted); }
.thumb.still { transition: none; }
.link { font-size: 12px; color: var(--accent); padding: 3px 4px; white-space: nowrap; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }
+11 -2
View File
@@ -12196,13 +12196,18 @@ const ROUTINGS = [
// dzxx0496 on Discord: free accounts one after another, the first not
// taking the requests back once it renews (routes.Drain)
["drain", "Until used up", "Requests stay on one until it is used up, then go to the next in the list and stay there: one before it that renews meanwhile doesn't take them back. One rate limited or failing is passed over while it rests, and requests come back to it after."],
["rotate", "In turn", "Each turn of a conversation goes to the next one, spreading the load evenly; the requests within a turn stay where it began, so the prompt cache holds, and one that fails is passed over while it rests."],
// the unit that goes round is the user's message (affine's "new-turn"),
// not a session (Wing8Aqua on X)
["rotate", "In turn", "Each message you send goes to the next one, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead."],
["usage", "Least used first", "Each request goes to the one used least: a subscription by the share of its allowance used, a key by the tokens it served in the last hours."],
["pace", "Use before expiry", "Each request goes to the subscription with the most left per hour until it is lost, at its reset or as credits expire; one at 90% of its five hours waits until the others can't answer, a week at 90% is still spent before its reset. A key goes by the tokens it served in the last hours."],
["weight", "By weight", "Requests spread over the keys or accounts by the weight set beside each: one weighing 3 takes three requests for every one weighing 1 takes, evenly over a few requests. One that fails is passed over while it rests, and the others share its requests; a conversation stays with it as Stays says."],
["free", "Free first", "Requests go to what costs nothing first: the models their vendor serves at no cost to this subscription's allowance or credits, in their listed order, and only when those can't answer to one that spends them. Nothing that cost nothing is left unused."],
["fast", "Speed first", "Requests go to the one that has answered this model fastest lately, by its time to the first token and how fast it writes; those within a tenth of each other keep their listed order. One not measured lately gets one request in five, so it is measured again, and one that fails is passed over while it rests."],
];
// drawRotFig shows In turn's figure (rotfig.js, imported when first
// drawn) in box while on, as Stays has it; off, the box is hidden and empty
const drawRotFig = (b, on, a) => (b.hidden = !on) ? b.replaceChildren() : (drawRotFig.p ||= import("./rotfig.js")).then(() => b.hidden || b.replaceChildren(rotateFigure(a)));
// the routings besides Smart are the built-in plugin rotation's
// (plugins/rotation): off, their options leave the page (data-feature),
// and Smart is left — one in use keeps it on
@@ -12295,9 +12300,12 @@ function renderRouting(p) {
return u;
};
const rHint = el("div", "hint expl"), rUnsaved = unsaved();
// In turn drawn under its words, as Stays has it
const rFig = el("div", "rot-wrap"), drawFig = () => drawRotFig(rFig, routingNow() === "rotate", affinityNow());
const drawRouting = () => {
const cur = routingsOf(p).find(([id]) => id === routingNow()) || ROUTINGS[0];
rHint.textContent = (ROUTINGS.includes(cur) ? t(cur[2]) : cur[2]) + own(cur[0]);
drawFig();
rUnsaved.hidden = routingNow() === (p.routing || "");
// in turn and by weight go round already
kLabel.hidden = kWrap.hidden = routingNow() === "rotate" || routingNow() === "weight";
@@ -12308,7 +12316,7 @@ function renderRouting(p) {
const rRow = el("div", "route-pick");
rRow.append(rPick, rUnsaved);
const rWrap = el("div", "fld");
rWrap.append(rRow, rHint);
rWrap.append(rRow, rHint, rFig);
const kHint = el("div", "hint expl"), kUnsaved = unsaved();
const drawSink = () => {
kHint.textContent = t(SINKS[sinkNow() ? 1 : 0][2]);
@@ -12325,6 +12333,7 @@ function renderRouting(p) {
const cur = STAYS.find(([id]) => id === affinityNow()) || STAYS[0];
sHint.textContent = t(cur[2]);
sUnsaved.hidden = affinityNow() === (p.affinity || "");
drawFig();
};
const sPick = segs(STAYS.map(([id, name]) => [id, t(name)]), affinityNow(), (affinity) => { draft.affinity = affinity; drawStays(); });
const sRow = el("div", "route-pick");
+8 -4
View File
@@ -2223,7 +2223,7 @@ const I18N = {
"Weight {n}": "权重 {n}",
"{key} weighs {n}": "{key} 的权重已设为 {n}",
"Requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.": "请求先发给第一个;它额度用完、被限流或出错时,由下一个接手。",
"Each turn of a conversation goes to the next one, spreading the load evenly; the requests within a turn stay where it began, so the prompt cache holds, and one that fails is passed over while it rests.": "会话每一轮轮流交给下一个,均摊负载;同一轮内的请求留在起始处,保持提示词缓存;出错的在暂停期间跳过。",
"Each message you send goes to the next one, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "你每发一条消息,就按列表顺序交给下一个;Agent 为这条消息做的工具调用留在同一个上。每换一次会损失部分提示词缓存;会话保持选「整个会话」时,改为整个会话固定在一个上。",
"Each request goes to the one used least: a subscription by the share of its allowance used, a key by the tokens it served in the last hours.": "每个请求发给用量最少的:订阅看已用额度比例,密钥看最近几小时经它的 token 数。",
"Use before expiry": "到期前用完",
"Each request goes to the subscription with the most left per hour until it is lost, at its reset or as credits expire; one at 90% of its five hours waits until the others can't answer, a week at 90% is still spent before its reset. A key goes by the tokens it served in the last hours.": "每个请求发给剩余额度 ÷ 距作废小时数最高的订阅——周额度在重置时作废,更早过期的积分按过期时间算;5 小时额度用到 90% 以上的,等其他都无法响应时才用,周额度用到 90% 的仍会在重置前用掉。密钥按最近几小时处理的 token 数排序。",
@@ -3737,6 +3737,7 @@ const I18N = {
"{n} messages": "{n} 条消息",
"Length": "时长",
"Tool calls": "工具调用",
"Your message": "你的消息",
"Tool use": "Tool 使用",
"Other": "其他",
"+{n} more": "还有 {n} 个",
@@ -7373,7 +7374,7 @@ const I18N = {
"Weight {n}": "權重 {n}",
"{key} weighs {n}": "{key} 的權重已設為 {n}",
"Requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.": "請求先發給第一個;它額度用完、被限流或出錯時,由下一個接手。",
"Each turn of a conversation goes to the next one, spreading the load evenly; the requests within a turn stay where it began, so the prompt cache holds, and one that fails is passed over while it rests.": "會話每一輪輪流交給下一個,均攤負載;同一輪內的請求留在起始處,保持提示詞快取;出錯的在暫停期間跳過。",
"Each message you send goes to the next one, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "你每發一則訊息,就按清單順序交給下一個;Agent 為這則訊息做的工具呼叫留在同一個上。每換一次會損失部分提示詞快取;會話保持選「整個會話」時,改為整個會話固定在一個上。",
"Each request goes to the one used least: a subscription by the share of its allowance used, a key by the tokens it served in the last hours.": "每個請求發給用量最少的:訂閱看已用額度比例,金鑰看最近幾小時經它的 token 數。",
"Use before expiry": "到期前用完",
"Each request goes to the subscription with the most left per hour until it is lost, at its reset or as credits expire; one at 90% of its five hours waits until the others can't answer, a week at 90% is still spent before its reset. A key goes by the tokens it served in the last hours.": "每個請求發給剩餘額度 ÷ 距作廢小時數最高的訂閱——週額度在重置時作廢,更早過期的點數按過期時間算;5 小時額度用到 90% 以上的,等其他都無法回應時才用,週額度用到 90% 的仍會在重置前用掉。金鑰按最近幾小時處理的 token 數排序。",
@@ -8877,6 +8878,7 @@ const I18N = {
"{n} messages": "{n} 條訊息",
"Length": "時長",
"Tool calls": "工具呼叫",
"Your message": "你的訊息",
"Tool use": "Tool 使用",
"Other": "其他",
"+{n} more": "還有 {n} 個",
@@ -12499,7 +12501,7 @@ const I18N = {
"Weight {n}": "重み {n}",
"{key} weighs {n}": "{key} の重みを {n} にしました",
"Requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.": "リクエストは最初のものに送られます。クォータ切れ、レート制限、エラーのときは次のものが引き継ぎます。",
"Each turn of a conversation goes to the next one, spreading the load evenly; the requests within a turn stay where it began, so the prompt cache holds, and one that fails is passed over while it rests.": "会話のターンごとに次のものへ送り、負荷を均等に分散します。ターン内のリクエストは開始した場所に留まるのでプロンプトキャッシュが効きます。エラーになったものは休止中スキップされます。",
"Each message you send goes to the next one, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "メッセージを送るたびに、リストの順で次のものへ回します。そのメッセージのためのエージェントのツール呼び出しは同じものに残ります。移るたびにプロンプトキャッシュの一部を失います。維持を「セッション」にすると、会話全体が一つに留まります。",
"Each request goes to the one used least: a subscription by the share of its allowance used, a key by the tokens it served in the last hours.": "各リクエストは使用量が最も少ないものに送られます。サブスクリプションは利用枠の使用割合、キーは直近数時間に処理したトークン数で判断します。",
"Use before expiry": "期限前に使い切る",
"Each request goes to the subscription with the most left per hour until it is lost, at its reset or as credits expire; one at 90% of its five hours waits until the others can't answer, a week at 90% is still spent before its reset. A key goes by the tokens it served in the last hours.": "各リクエストは、失われるまでの1時間あたりの残りが最も多いサブスクリプションに送られます — 週の枠はリセットで、それより早く期限切れになるクレジットはその期限で失われるため、リセットや期限切れで無駄になる分を減らします。5 時間枠を 90% 以上使用したものは他が応答できないときまで待機しますが、週の枠が 90% のものはリセット前に使い切ります。キーは直近数時間に処理したトークン数で判断します。",
@@ -14025,6 +14027,7 @@ const I18N = {
"{n} messages": "{n} 件のメッセージ",
"Length": "長さ",
"Tool calls": "ツール呼び出し",
"Your message": "送ったメッセージ",
"Tool use": "ツールの使用",
"Other": "その他",
"+{n} more": "ほか {n} 件",
@@ -17656,7 +17659,7 @@ const I18N = {
"Weight {n}": "Gewicht {n}",
"{key} weighs {n}": "{key} hat jetzt Gewicht {n}",
"Requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.": "Anfragen gehen an das erste; das nächste übernimmt, wenn das vorherige kein Kontingent mehr hat, ein Rate-Limit erreicht oder fehlschlägt.",
"Each turn of a conversation goes to the next one, spreading the load evenly; the requests within a turn stay where it began, so the prompt cache holds, and one that fails is passed over while it rests.": "Jede Runde eines Gesprächs geht an das nächste, damit sich die Last gleichmäßig verteilt; die Anfragen einer Runde bleiben dort, wo sie begann, damit der Prompt-Cache greift, und ein fehlgeschlagenes wird übersprungen, solange es pausiert.",
"Each message you send goes to the next one, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "Jede Nachricht, die Sie senden, geht an den nächsten in der Liste, reihum; die Tool-Aufrufe des Agenten dazu bleiben beim selben. Jeder Wechsel kostet etwas Prompt-Cache; mit Bleibt auf Sitzung bleibt eine ganze Unterhaltung bei einem.",
"Each request goes to the one used least: a subscription by the share of its allowance used, a key by the tokens it served in the last hours.": "Jede Anfrage geht an das am wenigsten genutzte: ein Abo nach dem verbrauchten Anteil seines Kontingents, ein Schlüssel nach den Token, die er in den letzten Stunden geliefert hat.",
"Use before expiry": "Vor Ablauf aufbrauchen",
"Each request goes to the subscription with the most left per hour until it is lost, at its reset or as credits expire; one at 90% of its five hours waits until the others can't answer, a week at 90% is still spent before its reset. A key goes by the tokens it served in the last hours.": "Jede Anfrage geht an das Abo mit dem meisten Rest pro Stunde, bis er verfällt — seine Woche beim Reset oder Guthaben darin, das früher abläuft —, damit weniger durch Resets und Ablauf verfällt; eines mit 90 % oder mehr seiner fünf Stunden wartet, bis die anderen nicht antworten können, eine Woche bei 90 % wird dagegen vor ihrem Reset noch aufgebraucht. Ein Schlüssel richtet sich nach den Token, die er in den letzten Stunden geliefert hat.",
@@ -19182,6 +19185,7 @@ const I18N = {
"{n} messages": "{n} Nachrichten",
"Length": "Länge",
"Tool calls": "Tool-Aufrufe",
"Your message": "Ihre Nachricht",
"Tool use": "Tool-Nutzung",
"Other": "Sonstige",
"+{n} more": "+{n} weitere",
@@ -633,7 +633,8 @@ function routingPage(part) {
"": ["Smart", "Smart: of the accounts with quota to spare, the one whose allowance renews soonest goes first — what it has left would be lost at the reset. The week decides; an account with five hours and no week goes by its five hours, and one whose month its weeks can no longer use up before it renews by its week. One at 90% or more waits until the others can't answer; one resting after a failure goes last."],
order: ["In order", "In order: the first answers everything until it can't; then the next."],
drain: ["Until used up", "Until used up: one answers everything until its quota is used up; then the next, which keeps them even after the one before renews."],
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."],
// the unit that goes round is the user's message (Wing8Aqua on X)
rotate: ["In turn", "In turn: each message you send goes to the next account, round the list; the agent's tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead."],
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: ["Use before expiry", "Use before expiry: the account with the most left per hour until it is lost goes first — at its reset, or, when credits in it expire sooner, by those that expire first; 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."],
manual: ["Manual", "Manual: every request goes to the model picked on the group's card, over its own accounts or keys."],
@@ -5994,7 +5995,7 @@ function routingPage(part) {
"": "Smart, over the members' accounts and keys together: of the subscriptions with quota to spare, the one whose allowance renews soonest goes first — the week decides, and an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later, and one whose month its weeks can no longer use up before it renews by its week; one resting after a failure goes last.",
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.",
drain: "Until used up: one account or key, across the members, takes every request until it is used up; then the next in the list, which keeps them even after an earlier one renews. One rate limited or failing is passed over only while it rests.",
rotate: "In turn: each conversation's next turn goes to the next member's account or key, spreading the load.",
rotate: "In turn: each message you send goes to the next member's account or key, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.",
usage: "Least used first: the account or key with the most of its allowance left goes first.",
pace: "Use before expiry: the account with the most left per hour until it is lost goes first — its week at its reset, or credits in it that expire sooner — so less of each member's allowance is lost; 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.",
weight: GROUP_WEIGHT,
@@ -7836,8 +7837,12 @@ function routingPage(part) {
const gHint = (v) => GROUP_HINT[v] ? t(GROUP_HINT[v]) : MODES[v] || !v ? t(GROUP_HINT[""]) : modeOf(v)[1];
const rHint = el("div", "hint", gHint(d.routing));
// In turn drawn under its words, as Stays has it (app.js drawRotFig)
const rFig = el("div", "rot-wrap");
const drawFig = () => drawRotFig(rFig, d.routing === "rotate", d.affinity || "");
drawFig();
const rw = el("div");
rw.append(routingSegs(withJS(GROUP_ROUTE_OPTS, d.routing).map(([id, n, js]) => [id, t(n), , js]), d.routing, (v) => { d.routing = v; rHint.textContent = gHint(v); draw(); drawRules(); drawSink(); }), rHint);
rw.append(routingSegs(withJS(GROUP_ROUTE_OPTS, d.routing).map(([id, n, js]) => [id, t(n), , js]), d.routing, (v) => { d.routing = v; rHint.textContent = gHint(v); drawFig(); draw(); drawRules(); drawSink(); }), rHint, rFig);
rw.append(el("div", "hint", t(GROUP_NEST)));
advIn.append(el("label", "", t("Routing")), rw);
// one rate limited with quota left: its place, or the back
@@ -7969,7 +7974,7 @@ function routingPage(part) {
advIn.append(el("label", "", t("Compact at")), cmpIn);
const aHint = el("div", "hint", t(AFF_HINT[d.affinity] || AFF_HINT[""]));
const aw = el("div");
aw.append(segs(AFF_OPTS.map(([id, n]) => [id, t(n)]), d.affinity, (v) => { d.affinity = v; aHint.textContent = t(AFF_HINT[v] || AFF_HINT[""]); }), aHint);
aw.append(segs(AFF_OPTS.map(([id, n]) => [id, t(n)]), d.affinity, (v) => { d.affinity = v; aHint.textContent = t(AFF_HINT[v] || AFF_HINT[""]); drawFig(); }), aHint);
advIn.append(el("label", "", t("Stays")), aw);
// which gateway keys may use it, and masking: set by few, so under
// Advanced with the rest (the owner, 11-12)
+8 -8
View File
@@ -420,7 +420,7 @@ magpie.strings({
"Only one account or key is on for this, so routing has nothing to choose between. Turn on a second in the provider's editor, and how it routes is set under Several accounts or keys below.": "这里只开了一个账号或 Key,路由没有可选的。在供应商的编辑页再开一个,路由方式就在下面的「多账号 / 多 Key」里设置。",
"Smart, over the members' accounts and keys together: of the subscriptions with quota to spare, the one whose allowance renews soonest goes first — the week decides, and an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later, and one whose month its weeks can no longer use up before it renews by its week; one resting after a failure goes last.": "智能:成员的账号和 Key 统一排序。有余量的订阅中额度最先重置的排第一,以周额度为准;只有 5 小时额度的账号(如 Claude Enterprise)按 5 小时重置,排在更晚重置的周额度之前;月额度已来不及靠每周额度用完的按周重置;失败后休息中的排最后。",
"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.": "按顺序:先用第一个模型,无法响应再换下一个;各成员按其供应商的路由在自己的账号或 Key 间分配。",
"In turn: each conversation's next turn goes to the next member's account or key, spreading the load.": "轮流:会话的每一轮交给下一个成员的账号或 Key,均摊负载。",
"In turn: each message you send goes to the next member's account or key, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "轮流:你每发一条消息,就按列表顺序交给下一个成员的账号或 Key;Agent 为这条消息做的工具调用留在同一个上。每换一次会损失部分提示词缓存;会话保持选「整个会话」时,改为整个会话固定在一个上。",
"Least used first: the account or key with the most of its allowance left goes first.": "最少使用优先:剩余额度最多的账号或 Key 排第一。",
"Use before expiry: the account with the most left per hour until it is lost goes first — its week at its reset, or credits in it that expire sooner — so less of each member's allowance is lost; 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.": "到期前用完:按剩余额度 ÷ 距作废小时数排序,越高越先用——周额度在重置时作废,更早过期的积分按过期时间算。只有 5 小时额度的账号(如 Claude Enterprise)按 5 小时窗口计算,几乎总排第一;Key 按最近发给它的 token 数排。",
"A group among the models, and a model whose provider routes its accounts or keys other than Smart, keeps its own routing: this group only picks between it and the others, weighing it by the account or key it would try first, then tries it whole in its own order. A group among the models left on Smart is routed as this group is, unless this one goes In order, By weight or Manual.": "成员中的路由组,以及服务商路由不是“智能”的模型,都保留自己的路由:本组只在它与其他成员间选择(按它会先用的账号或 Key 比较),选中后按其自身顺序整体尝试。成员中路由留在“智能”的路由组,按本组的路由走,除非本组是“按顺序”“按权重”或“手动”。",
@@ -488,7 +488,7 @@ magpie.strings({
"Smart: of the accounts with quota to spare, the one whose allowance renews soonest goes first — what it has left would be lost at the reset. The week decides; an account with five hours and no week goes by its five hours, and one whose month its weeks can no longer use up before it renews by its week. One at 90% or more waits until the others can't answer; one resting after a failure goes last.": "智能:有余量的账号中额度最先重置的排第一,以免剩余额度在重置时作废。以周额度为准;只有 5 小时额度的账号按 5 小时重置,月额度已来不及靠每周额度用完的按周重置。用到 90% 以上的,等其他都无法响应时才用;失败后休息中的排最后。",
"Smart: keys that suit the request go first — one made for the model's own API — then in their order. One resting after a failure goes last.": "智能:适合此请求的 Key(为该模型原生 API 准备的)排前,其余按顺序。失败后休息中的排最后。",
"In order: the first answers everything until it can't; then the next.": "按顺序:第一个处理所有请求,无法响应时再换下一个。",
"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.": "轮流:会话的下一轮交给上一轮回答者的下一个账号,新会话再往后一个;一轮之内不换账号,保持提示词缓存。",
"In turn: each message you send goes to the next account, round the list; the agent's tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead.": "轮流:你每发一条消息,就按列表顺序交给下一个账号;Agent 为这条消息做的工具调用留在同一个上。会话保持选「整个会话」时,改为整个会话固定在一个上。",
"Least used first: the account with the most of its allowance left goes first; a key by the tokens magpie sent it lately.": "最少使用优先:剩余额度最多的账号排第一;Key 按 magpie 最近发给它的 token 数排。",
"Use before expiry: the account with the most left per hour until it is lost goes first — at its reset, or, when credits in it expire sooner, by those that expire first; 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.": "到期前用完:按剩余额度 ÷ 距作废小时数排序,越高越先用——额度在重置时作废,有积分更早过期的按最先过期的那部分算;只有 5 小时额度的账号按 5 小时窗口计算。用到 90% 以上的,等其他都无法响应时才用;Key 按最近发给它的 token 数排。",
"Nothing could take {model}.": "没有谁能处理 {model}。",
@@ -1167,7 +1167,7 @@ magpie.strings({
"Only one account or key is on for this, so routing has nothing to choose between. Turn on a second in the provider's editor, and how it routes is set under Several accounts or keys below.": "這裡只開了一個帳號或 Key,路由沒有可選的。在供應商的編輯頁再開一個,路由方式就在下面的「多帳號 / 多 Key」裡設定。",
"Smart, over the members' accounts and keys together: of the subscriptions with quota to spare, the one whose allowance renews soonest goes first — the week decides, and an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later, and one whose month its weeks can no longer use up before it renews by its week; one resting after a failure goes last.": "智慧:成員的帳號和 Key 統一排序。有餘量的訂閱中額度最先重置的排第一,以週額度為準;只有 5 小時額度的帳號(如 Claude Enterprise)按 5 小時重置,排在更晚重置的週額度之前;月額度已來不及靠每週額度用完的按週重置;失敗後休息中的排最後。",
"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.": "按順序:先用第一個模型,無法回應再換下一個;各成員按其供應商的路由在自己的帳號或 Key 間分配。",
"In turn: each conversation's next turn goes to the next member's account or key, spreading the load.": "輪流:會話的每一輪交給下一個成員的帳號或 Key,均攤負載。",
"In turn: each message you send goes to the next member's account or key, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "輪流:你每發一則訊息,就按清單順序交給下一個成員的帳號或 Key;Agent 為這則訊息做的工具呼叫留在同一個上。每換一次會損失部分提示詞快取;會話保持選「整個會話」時,改為整個會話固定在一個上。",
"Least used first: the account or key with the most of its allowance left goes first.": "最少使用優先:剩餘額度最多的帳號或 Key 排第一。",
"Use before expiry: the account with the most left per hour until it is lost goes first — its week at its reset, or credits in it that expire sooner — so less of each member's allowance is lost; 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.": "到期前用完:按剩餘額度 ÷ 距作廢小時數排序,越高越先用——週額度在重置時作廢,更早過期的點數按過期時間算。只有 5 小時額度的帳號(如 Claude Enterprise)按 5 小時時段計算,幾乎總排第一;Key 按最近發給它的 token 數排。",
"A group among the models, and a model whose provider routes its accounts or keys other than Smart, keeps its own routing: this group only picks between it and the others, weighing it by the account or key it would try first, then tries it whole in its own order. A group among the models left on Smart is routed as this group is, unless this one goes In order, By weight or Manual.": "成員中的路由組,以及服務商路由不是「智慧」的模型,都保留自己的路由:本組只在它與其他成員間選擇(按它會先用的帳號或 Key 比較),選中後按其自身順序整體嘗試。成員中路由留在「智慧」的路由組,按本組的路由走,除非本組是「按順序」「按權重」或「手動」。",
@@ -1235,7 +1235,7 @@ magpie.strings({
"Smart: of the accounts with quota to spare, the one whose allowance renews soonest goes first — what it has left would be lost at the reset. The week decides; an account with five hours and no week goes by its five hours, and one whose month its weeks can no longer use up before it renews by its week. One at 90% or more waits until the others can't answer; one resting after a failure goes last.": "智慧:有餘量的帳號中額度最先重置的排第一,以免剩餘額度在重置時作廢。以週額度為準;只有 5 小時額度的帳號按 5 小時重置,月額度已來不及靠每週額度用完的按週重置。用到 90% 以上的,等其他都無法回應時才用;失敗後休息中的排最後。",
"Smart: keys that suit the request go first — one made for the model's own API — then in their order. One resting after a failure goes last.": "智慧:適合此請求的 Key(為該模型原生 API 準備的)排前,其餘按順序。失敗後休息中的排最後。",
"In order: the first answers everything until it can't; then the next.": "按順序:第一個處理所有請求,無法回應時再換下一個。",
"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.": "輪流:會話的下一輪交給上一輪迴答者的下一個帳號,新會話再往後一個;一輪之內不換帳號,保持提示詞快取。",
"In turn: each message you send goes to the next account, round the list; the agent's tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead.": "輪流:你每發一則訊息,就按清單順序交給下一個帳號;Agent 為這則訊息做的工具呼叫留在同一個上。會話保持選「整個會話」時,改為整個會話固定在一個上。",
"Least used first: the account with the most of its allowance left goes first; a key by the tokens magpie sent it lately.": "最少使用優先:剩餘額度最多的帳號排第一;Key 按 magpie 最近發給它的 token 數排。",
"Use before expiry: the account with the most left per hour until it is lost goes first — at its reset, or, when credits in it expire sooner, by those that expire first; 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.": "到期前用完:按剩餘額度 ÷ 距作廢小時數排序,越高越先用——額度在重置時作廢,有點數更早過期的按最先過期的那部分算;只有 5 小時額度的帳號按 5 小時時段計算。用到 90% 以上的,等其他都無法回應時才用;Key 按最近發給它的 token 數排。",
"Nothing could take {model}.": "沒有誰能處理 {model}。",
@@ -1912,7 +1912,7 @@ magpie.strings({
"Only one account or key is on for this, so routing has nothing to choose between. Turn on a second in the provider's editor, and how it routes is set under Several accounts or keys below.": "有効なアカウントやキーが 1 つだけなので、ルーティングに選択肢はありません。プロバイダの編集画面で 2 つ目を有効にすると、ルーティングは下の「複数のアカウントやキー」で設定できます。",
"Smart, over the members' accounts and keys together: of the subscriptions with quota to spare, the one whose allowance renews soonest goes first — the week decides, and an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later, and one whose month its weeks can no longer use up before it renews by its week; one resting after a failure goes last.": "スマート(メンバーのアカウントとキーをまとめて扱う):クォータに余裕のあるサブスクリプションのうち、利用枠のリセットが最も早いものが先頭です。週の枠で判断し、5 時間枠のみで週の枠がないアカウント(Claude Enterprise)は 5 時間枠で判断するため、それより後にリセットされるどの週の枠よりも前になります。月の枠をリセットまでに週の枠では使い切れなくなったものは週の枠で判断します。失敗後に休止中のものは最後です。",
"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.": "順番:先頭のモデルが応答できなくなるまで使い、その後次へ。各モデルはそのプロバイダのルーティングに従って自身のアカウントやキーを使います。",
"In turn: each conversation's next turn goes to the next member's account or key, spreading the load.": "交互:各会話の次のターンを次のメンバーのアカウントやキーに送り、負荷を分散します。",
"In turn: each message you send goes to the next member's account or key, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "交互:メッセージを送るたびに、リストの順で次のメンバーのアカウントやキーへ回します。そのメッセージのためのエージェントのツール呼び出しは同じものに残ります。移るたびにプロンプトキャッシュの一部を失います。維持を「セッション」にすると、会話全体が一つに留まります。",
"Least used first: the account or key with the most of its allowance left goes first.": "使用量が最少を優先:利用枠の残りが最も多いアカウントやキーが先頭です。",
"Use before expiry: the account with the most left per hour until it is lost goes first — its week at its reset, or credits in it that expire sooner — so less of each member's allowance is lost; 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.": "期限前に使い切る:失われるまでの 1 時間あたりの残りが最も多いアカウントが先頭になり、各メンバーの枠が失われる分が減ります — 週の枠はリセットで、それより早く期限切れになるクレジットはその期限で失われます。5 時間枠のみで週の枠がないアカウント(Claude Enterprise)は、リセットまでの 1 時間あたりの 5 時間枠の残りで判断するため、ほぼ常に先頭です。キーは magpie が最近送ったトークン数で判断します。",
"A group among the models, and a model whose provider routes its accounts or keys other than Smart, keeps its own routing: this group only picks between it and the others, weighing it by the account or key it would try first, then tries it whole in its own order. A group among the models left on Smart is routed as this group is, unless this one goes In order, By weight or Manual.": "モデルの中のグループと、プロバイダーのルーティングがスマート以外のモデルは、独自のルーティングを保ちます。このグループはそれと他のメンバーの間で選ぶだけで、そのグループが最初に試すアカウントやキーで比較し、選ばれたらそのグループ全体を独自の順番で試します。ルーティングをスマートのままにしたモデルの中のグループは、このグループのルーティングに従います。ただし、このグループが順番、重み付け、手動の場合を除きます。",
@@ -1980,7 +1980,7 @@ magpie.strings({
"Smart: of the accounts with quota to spare, the one whose allowance renews soonest goes first — what it has left would be lost at the reset. The week decides; an account with five hours and no week goes by its five hours, and one whose month its weeks can no longer use up before it renews by its week. One at 90% or more waits until the others can't answer; one resting after a failure goes last.": "スマート:クォータに余裕のあるアカウントのうち、利用枠が最も早く更新されるものが先です — 残りはリセット時に失われるためです。週の枠で決まり、5 時間枠だけで週の枠がないアカウントは 5 時間枠で、月の枠を更新までに週の枠では使い切れなくなったアカウントは週の枠で決まります。90% 以上使ったアカウントは他が応答できなくなるまで待ち、失敗後に休止中のアカウントは最後になります。",
"Smart: keys that suit the request go first — one made for the model's own API — then in their order. One resting after a failure goes last.": "スマート:リクエストに合うキー — モデル本来の API 用のキー — が先で、その後は設定順です。失敗後に休止中のキーは最後になります。",
"In order: the first answers everything until it can't; then the next.": "順番:最初の 1 つが応答できなくなるまですべてに応答し、その後は次へ。",
"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.": "交互:各会話の次のターンは前回応答したアカウントの次のアカウントへ、新しい会話はさらにその次から始まります。ターン内のリクエストは同じアカウントのままで、プロンプトキャッシュを保ちます。",
"In turn: each message you send goes to the next account, round the list; the agent's tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead.": "交互:メッセージを送るたびに、リストの順で次のアカウントへ回します。そのメッセージのためのエージェントのツール呼び出しは同じものに残ります。維持を「セッション」にすると、会話全体が一つに留まります。",
"Least used first: the account with the most of its allowance left goes first; a key by the tokens magpie sent it lately.": "使用量が最少:利用枠の残りが最も多いアカウントが先です。キーは magpie が最近送ったトークン数で決まります。",
"Use before expiry: the account with the most left per hour until it is lost goes first — at its reset, or, when credits in it expire sooner, by those that expire first; 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.": "期限前に使い切る:失われるまでの 1 時間あたりの残りが最も多いアカウントが先です — 残りはリセットで失われ、それより早く期限切れになるクレジットがあれば最初に期限切れになる分で決まります。5 時間枠だけで週の枠がないアカウントは 5 時間枠の 1 時間あたりの残りで決まります。90% 以上使ったアカウントは他が応答できなくなるまで待ち、キーは magpie が最近送ったトークン数で決まります。",
"Nothing could take {model}.": "{model} を処理できる相手がいませんでした。",
@@ -2659,7 +2659,7 @@ magpie.strings({
"Only one account or key is on for this, so routing has nothing to choose between. Turn on a second in the provider's editor, and how it routes is set under Several accounts or keys below.": "Hier ist nur ein Konto oder Schlüssel aktiv, also hat die Weiterleitung keine Wahl. Aktiviere im Editor des Anbieters ein zweites; wie weitergeleitet wird, legst du dann unten unter „Mehrere Konten oder Schlüssel“ fest.",
"Smart, over the members' accounts and keys together: of the subscriptions with quota to spare, the one whose allowance renews soonest goes first — the week decides, and an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later, and one whose month its weeks can no longer use up before it renews by its week; one resting after a failure goes last.": "Intelligent, über Konten und Schlüssel aller Mitglieder zusammen: Von den Abos mit freiem Kontingent kommt das zuerst, dessen Kontingent sich am frühesten erneuert – die Woche entscheidet, und ein Konto mit fünf Stunden und ohne Woche (Claude Enterprise) richtet sich nach seinen fünf Stunden, also vor jeder später erneuerten Woche, und eines, dessen Monat seine Wochen vor der Erneuerung nicht mehr aufbrauchen können, nach seiner Woche; eines, das nach einem Fehler pausiert, kommt zuletzt.",
"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.": "Der Reihe nach: das erste Modell, bis es nicht mehr antworten kann, dann das nächste – jedes über seine eigenen Konten oder Schlüssel, wie sein Anbieter sie weiterleitet.",
"In turn: each conversation's next turn goes to the next member's account or key, spreading the load.": "Abwechselnd: Die nächste Runde jeder Unterhaltung geht an Konto oder Schlüssel des nächsten Mitglieds und verteilt so die Last.",
"In turn: each message you send goes to the next member's account or key, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.": "Abwechselnd: Jede Nachricht, die Sie senden, geht an das nächste Konto oder den nächsten Schlüssel der Mitglieder, reihum; die Tool-Aufrufe des Agenten dazu bleiben beim selben. Jeder Wechsel kostet etwas Prompt-Cache; mit Bleibt auf Sitzung bleibt eine ganze Unterhaltung bei einem.",
"Least used first: the account or key with the most of its allowance left goes first.": "Am wenigsten genutzt zuerst: Das Konto oder der Schlüssel mit dem größten Restkontingent kommt zuerst.",
"Use before expiry: the account with the most left per hour until it is lost goes first — its week at its reset, or credits in it that expire sooner — so less of each member's allowance is lost; 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.": "Vor Ablauf aufbrauchen: Das Konto mit dem meisten Rest pro Stunde, bis er verfällt, kommt zuerst – seine Woche beim Zurücksetzen oder Guthaben darin, das früher abläuft –, damit von jedem Mitglied weniger verfällt; ein Konto mit fünf Stunden und ohne Woche (Claude Enterprise) nach dem Rest seiner fünf Stunden pro Stunde bis zur Erneuerung, also fast immer zuerst; ein Schlüssel nach den Token, die magpie ihm zuletzt gesendet hat.",
"A group among the models, and a model whose provider routes its accounts or keys other than Smart, keeps its own routing: this group only picks between it and the others, weighing it by the account or key it would try first, then tries it whole in its own order. A group among the models left on Smart is routed as this group is, unless this one goes In order, By weight or Manual.": "Eine Gruppe unter den Modellen und ein Modell, dessen Anbieter seine Konten oder Schlüssel anders als „Intelligent“ weiterleitet, behalten ihre eigene Weiterleitung: Diese Gruppe wählt nur zwischen ihr und den anderen, gewichtet nach dem Konto oder Schlüssel, den sie zuerst versuchen würde, und versucht sie dann als Ganzes in ihrer eigenen Reihenfolge. Eine Gruppe unter den Modellen, deren Weiterleitung auf „Intelligent“ steht, wird wie diese Gruppe weitergeleitet, außer diese geht „Der Reihe nach“, „Nach Gewicht“ oder „Manuell“.",
@@ -2727,7 +2727,7 @@ magpie.strings({
"Smart: of the accounts with quota to spare, the one whose allowance renews soonest goes first — what it has left would be lost at the reset. The week decides; an account with five hours and no week goes by its five hours, and one whose month its weeks can no longer use up before it renews by its week. One at 90% or more waits until the others can't answer; one resting after a failure goes last.": "Intelligent: Von den Konten mit freiem Kontingent kommt das zuerst, dessen Kontingent sich am frühesten erneuert – sein Rest würde beim Zurücksetzen verfallen. Die Woche entscheidet; ein Konto mit fünf Stunden und ohne Woche richtet sich nach seinen fünf Stunden, eines, dessen Monat seine Wochen vor der Erneuerung nicht mehr aufbrauchen können, nach seiner Woche. Eines ab 90 % wartet, bis die anderen nicht antworten können; eines, das nach einem Fehler pausiert, kommt zuletzt.",
"Smart: keys that suit the request go first — one made for the model's own API — then in their order. One resting after a failure goes last.": "Intelligent: Schlüssel, die zur Anfrage passen, kommen zuerst – einer für die eigene API des Modells –, dann in ihrer Reihenfolge. Einer, der nach einem Fehler pausiert, kommt zuletzt.",
"In order: the first answers everything until it can't; then the next.": "Der Reihe nach: Der erste beantwortet alles, bis er nicht mehr kann; dann der nächste.",
"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.": "Abwechselnd: Die nächste Runde jeder Unterhaltung geht an das Konto nach dem, das die letzte beantwortet hat, und eine neue Unterhaltung beginnt eines weiter; die Anfragen innerhalb einer Runde bleiben, sodass der Prompt-Cache erhalten bleibt.",
"In turn: each message you send goes to the next account, round the list; the agent's tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead.": "Abwechselnd: Jede Nachricht, die Sie senden, geht an das nächste Konto in der Liste, reihum; die Tool-Aufrufe des Agenten dazu bleiben beim selben. Mit Bleibt auf Sitzung bleibt eine ganze Unterhaltung bei einem.",
"Least used first: the account with the most of its allowance left goes first; a key by the tokens magpie sent it lately.": "Am wenigsten genutzt zuerst: Das Konto mit dem größten Restkontingent kommt zuerst; ein Schlüssel nach den Token, die magpie ihm zuletzt gesendet hat.",
"Use before expiry: the account with the most left per hour until it is lost goes first — at its reset, or, when credits in it expire sooner, by those that expire first; 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.": "Vor Ablauf aufbrauchen: Das Konto mit dem meisten Rest pro Stunde, bis er verfällt, kommt zuerst – beim Zurücksetzen oder, wenn Guthaben darin früher abläuft, nach dem, das zuerst abläuft; ein Konto mit fünf Stunden und ohne Woche nach dem Rest seiner fünf Stunden pro Stunde. Eines ab 90 % wartet, bis die anderen nicht antworten können; ein Schlüssel nach den Token, die magpie ihm zuletzt gesendet hat.",
"Nothing could take {model}.": "Nichts konnte {model} übernehmen.",
+49
View File
@@ -0,0 +1,49 @@
// rotateFigure: In turn, drawn: two conversations, three of the user's
// messages each (a pill naming the account it went to), each followed by
// the agent's tool calls (dots in that account's shade). As Stays has it
// (gateway affine): Auto and Within a turn move each message on, Session
// and Strict keep a conversation on one, Off moves every request on.
// Wing8Aqua on X: the words alone left the unit that goes round unclear.
// app.js's drawRotFig imports this when In turn is first shown, so it
// weighs nothing on the core.
window.rotateFigure = function (affinity) {
const NS = "http://www.w3.org/2000/svg";
const mk = (tag, attrs, text) => {
const n = document.createElementNS(NS, tag);
for (const [k, v] of Object.entries(attrs)) n.setAttribute(k, v);
if (text) n.textContent = text;
return n;
};
const s = mk("svg", { viewBox: "0 0 232 70", width: 232, height: 70, class: "rot-fig", "aria-hidden": "true" });
s.dataset.affinity = affinity || "";
const whole = affinity === "session" || affinity === "strict";
const each = affinity === "off";
for (let row = 0; row < 2; row++) {
const y = 4 + row * 26;
s.append(mk("rect", { x: 0.5, y: y + 0.5, width: 231, height: 21, rx: 10.5, class: "rot-track" }));
let n = row; // a new conversation starts one further along
for (let m = 0; m < 3; m++) {
const x = 6 + m * 75, at = whole ? row : each ? n : row + m;
const g = mk("g", { class: "rot-msg" });
g.append(mk("line", { x1: x + 22, y1: y + 11, x2: x + 50, y2: y + 11, class: "rot-link" }));
g.append(mk("rect", { x, y: y + 4, width: 22, height: 14, rx: 7, class: "rot-acct rot-" + "abc"[at % 3] }));
g.append(mk("text", { x: x + 11, y: y + 14.5, "text-anchor": "middle", class: "rot-l rot-" + "abc"[at % 3] }, "ABC"[at % 3]));
if (each) n++;
for (let d = 0; d < 2; d++) {
const k = each ? n++ : at;
g.append(mk("circle", { cx: x + 34 + d * 10, cy: y + 11, r: 3, class: "rot-call rot-" + "abc"[k % 3] }));
}
g.dataset.to = "ABC"[at % 3];
s.append(g);
}
}
// what a pill and a dot are
const ly = 65;
s.append(mk("rect", { x: 0.5, y: ly - 7, width: 14, height: 9, rx: 4.5, class: "rot-key" }));
const msg = mk("text", { x: 19, y: ly, class: "rot-legend" }, t("Your message"));
s.append(msg);
s.append(mk("circle", { cx: 122, cy: ly - 2.5, r: 2.5, class: "rot-key" }));
s.append(mk("circle", { cx: 130, cy: ly - 2.5, r: 2.5, class: "rot-key" }));
s.append(mk("text", { x: 138, y: ly, class: "rot-legend" }, t("Tool calls")));
return s;
};
+1 -1
View File
@@ -18,7 +18,7 @@ import (
// `git log -L` of this file.
const (
appScriptBudget = 1_086_267 // app.js: 1,080,614 at 8016205e3, with the 5,653 of room it had
coreScriptBudget = 1_266_008 // every core script at 8016205e3, the old measure 682 over its cap there (#5918); +367 for the model test on a chosen account (tmr11235), no page left to move it to; +151 for the provider menu's "Only on this device" item and its four translations; +458 for Settings › About's Report a problem row and its translations; +113 for withScheme, the one rule every typed address goes through (eachg0 on X), cut to the shortest form that keeps it whole; +10 for the kept whole's tooltip (Musikrv77852 on X), the past-cycle line reused for it, no page left to move it to; +1,112 for Codex's Open button and its Open Codex with menu (Yink88564391 on X), packed to the shortest form, no page left to move them to; +168 for Discover's long lists drawn in part (the owner, 11-13), after the rest of its hook moved into plugingrid.js, imported when Plugins first draws; +296 for the cap toggle and Smart sentences that say what they do and the Sign in on another computer row (Wing8Aqua on X), packed to the shortest form, no page left to move them to
coreScriptBudget = 1_266_341 // every core script at 8016205e3, the old measure 682 over its cap there (#5918); +367 for the model test on a chosen account (tmr11235), no page left to move it to; +151 for the provider menu's "Only on this device" item and its four translations; +458 for Settings › About's Report a problem row and its translations; +113 for withScheme, the one rule every typed address goes through (eachg0 on X), cut to the shortest form that keeps it whole; +10 for the kept whole's tooltip (Musikrv77852 on X), the past-cycle line reused for it, no page left to move it to; +1,112 for Codex's Open button and its Open Codex with menu (Yink88564391 on X), packed to the shortest form, no page left to move them to; +168 for Discover's long lists drawn in part (the owner, 11-13), after the rest of its hook moved into plugingrid.js, imported when Plugins first draws; +296 for the cap toggle and Smart sentences that say what they do and the Sign in on another computer row (Wing8Aqua on X), packed to the shortest form, no page left to move them to; +333 for In turn's figure in a provider's editor and its words naming the message that goes round (Wing8Aqua on X), the figure itself in rotfig.js, imported when In turn is first shown, the hook packed to the shortest form
)
// codeBytes is how many bytes of b are code: its blank lines, its lines
+2 -1
View File
@@ -178,9 +178,10 @@ test("compat.js is the first of the page's own scripts", async () => {
// pipecheck.js when Settings draws Models;
// addfloat.js when the Providers page's add sheet first opens;
// plugingrid.js when Plugins first draws;
// rotfig.js when a routing's In turn is first shown;
// the checks above
// still read them
for (const f of await scripts()) if (!["webfonts.js", "cfgblocked.js", "signsheets.js", "ruleedit.js", "ratewindows.js", "traywindows.js", "autoresetown.js", "registry.js", "navlamp.js", "whatsnew.js", "claudemode.js", "ctxtext.js", "resetask.js", "quotaall.js", "quotatable.js", "quitask.js", "checkinnow.js", "proxies.js", "autobackup.js", "scrollends.js", "profilerename.js", "settingshints.js", "keyspend.js", "syncfiles.js", "agentcompact.js", "agentwindow.js", "balfound.js", "passerrors.js", "tlscerts.js", "keybalance.js", "modellimits.js", "notices.js", "videogen.js", "provlinks.js", "setfeats.js", "pageshare.js", "panelfirst.js", "panelarrange.js", "modelfind.js", "agentsmanager.js", "agentsuffix.js", "phonetabs.js", "pluginmd.js", "bark.js", "acctexport.js", "plugincounts.js", "navicons.js", "autoswitchtip.js", "codexprojects.js", "pipecheck.js", "addfloat.js", "plugingrid.js"].includes(f)) assert(all.includes(f), f + " is not loaded by index.html");
for (const f of await scripts()) if (!["webfonts.js", "cfgblocked.js", "signsheets.js", "ruleedit.js", "ratewindows.js", "traywindows.js", "autoresetown.js", "registry.js", "navlamp.js", "whatsnew.js", "claudemode.js", "ctxtext.js", "resetask.js", "quotaall.js", "quotatable.js", "quitask.js", "checkinnow.js", "proxies.js", "autobackup.js", "scrollends.js", "profilerename.js", "settingshints.js", "keyspend.js", "syncfiles.js", "agentcompact.js", "agentwindow.js", "balfound.js", "passerrors.js", "tlscerts.js", "keybalance.js", "modellimits.js", "notices.js", "videogen.js", "provlinks.js", "setfeats.js", "pageshare.js", "panelfirst.js", "panelarrange.js", "modelfind.js", "agentsmanager.js", "agentsuffix.js", "phonetabs.js", "pluginmd.js", "bark.js", "acctexport.js", "plugincounts.js", "navicons.js", "autoswitchtip.js", "codexprojects.js", "pipecheck.js", "addfloat.js", "plugingrid.js", "rotfig.js"].includes(f)) assert(all.includes(f), f + " is not loaded by index.html");
});
test("the styles hold up in Safari 15.0", async () => {
+180
View File
@@ -0,0 +1,180 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// In turn says which unit goes round, and draws it (Wing8Aqua on X: "each
// turn of a conversation goes to the next one" read as every message of a
// session moving, and a session as the unit expected). The hint names the
// message you send, the tool calls that stay with it, and Stays: Session
// for a whole conversation on one. Under it a small figure: two
// conversations of three messages each, a pill naming the account each
// went to, then its tool calls in that account's shade — moved on per
// message under Auto, one account a conversation under Session, every
// request under Off, as the gateway's affine routes them. In a provider's
// editor and a routing group's, every language, wide and narrow, Chromium
// and WebKit; the figure fits, nothing scrolls sideways, and it is gone
// for any other routing.
const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { chromium, webkit } = require("playwright");
const assets = path.resolve(process.env.MAGPIE_ROTATE_ASSETS || path.join(__dirname, "../assets"));
const sub = {
icon: "generic", catalog: "", models: [{ id: "gpt-5.5", name: "GPT-5.5", on: true }], agents: [], fallback: [], headers: {}, routing: "rotate", affinity: "", ready: true,
id: "codex", name: "Codex", chat: "", responses: "", anthropic: "", keyList: [],
account: {
agent: "codex", agentName: "Codex", user: "one@example.test", plan: "Plus",
logins: ["one", "two", "three"].map((n, i) => ({ user: `${n}@example.test`, plan: "Plus", active: i === 0, on: true })),
},
};
const models = [
{ id: "a/sol", name: "sol", providerName: "A", icon: "generic" },
{ id: "b/sol", name: "sol", providerName: "B", icon: "generic" },
];
const members = models.map((m) => m.id);
const groups = () => ({
models, pools: [],
groups: [{ id: "sol", name: "Sol", members, routing: "rotate", ready: true, memberInfo: members.map((id) => ({ id, ready: true })) }],
});
function serve(lang, theme) {
const state = { agents: [{ id: "pi", name: "Pi", path: "/test/pi", fields: [] }], profiles: [], settings: { lang, theme } };
const providers = { providers: [sub], presets: [], excluded: [], gateway: { running: true, window: true, url: "http://127.0.0.1:3999" } };
return async (r) => {
const url = new URL(r.request().url());
const json = (data) => r.fulfill({ json: data });
if (url.pathname === "/boot.js") return r.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = {lang:${JSON.stringify(lang)},theme:${JSON.stringify(theme)},web:true};` });
if (url.pathname === "/wails/runtime.js") return r.fulfill({ contentType: "text/javascript", body: "export const Window = {};" });
if (url.pathname === "/api/state") return json(state);
if (url.pathname === "/api/plugins") return json({ plugins: [] });
if (url.pathname === "/api/gateway/trace") {
if (url.searchParams.get("wait")) return new Promise(() => {}); // nothing more comes
return json({ mine: true, now: new Date().toISOString(), seq: 0, totals: { requests: 0, rerouted: 0, errors: 0 }, routes: [] });
}
if (url.pathname === "/api/gateway/history") return json({ cut: false, days: [], routes: [] });
if (url.pathname === "/api/groups") return json(groups());
if (url.pathname === "/api/providers") return json(providers);
if (url.pathname.startsWith("/api/")) return json({});
const file = path.join(assets, url.pathname === "/" ? "index.html" : url.pathname);
const contentType = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".svg": "image/svg+xml", ".png": "image/png" }[path.extname(file)];
try { await r.fulfill({ body: await fs.readFile(file), contentType }); } catch { await r.fulfill({ status: 404, body: "" }); }
};
}
const LANGS = ["en", "zh", "zh-TW", "ja", "de"];
// the hint names the message you send as what goes round
const SAYS = { en: /Each message you send goes to the next/i, zh: /你每发一条消息/, "zh-TW": /你每發一則訊息/, ja: /メッセージを送るたびに/, de: /Jede Nachricht, die Sie senden/ };
const HINTS = [
"Each message you send goes to the next one, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.",
"In turn: each message you send goes to the next member's account or key, round the list; the agent's tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.",
"In turn: each message you send goes to the next account, round the list; the agent's tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead.",
"Your message", "Tool calls",
];
// what the figure draws: each conversation's three messages, the account
// each went to, and the accounts its tool calls went to
const fig = (scope) => scope.locator("svg.rot-fig").evaluate((s) => ({
affinity: s.dataset.affinity,
msgs: [...s.querySelectorAll(".rot-msg")].map((g) => g.dataset.to).join(""),
calls: [...s.querySelectorAll(".rot-call")].map((c) => [...c.classList].find((k) => /^rot-[abc]$/.test(k)).slice(4).toUpperCase()).join(""),
legend: [...s.querySelectorAll(".rot-legend")].map((x) => x.textContent),
box: (() => { const r = s.getBoundingClientRect(); return { x: r.x, r: r.right, w: r.width, h: r.height }; })(),
}));
const fits = async (page, scope, name) => {
const f = await fig(scope);
const ed = await scope.boundingBox();
assert.ok(f.box.w > 100 && f.box.h > 20, `${name}: the figure is drawn: ${JSON.stringify(f.box)}`);
assert.ok(f.box.x >= ed.x - 1 && f.box.r <= ed.x + ed.width + 1, `${name}: the figure past the editor's edge: ${JSON.stringify(f.box)} in ${JSON.stringify(ed)}`);
// the legend's two words don't run into each other
const [a, b] = await scope.locator("svg.rot-fig .rot-legend").evaluateAll((ts) => ts.map((x) => { const r = x.getBoundingClientRect(); return { l: r.left, r: r.right }; }));
assert.ok(a.r < b.l - 6, `${name}: the legend's words overlap: ${JSON.stringify([a, b])}`);
assert.equal(await page.evaluate(() => document.scrollingElement.scrollWidth <= innerWidth), true, `${name}: no sideways scroll`);
};
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
const launch = () => engine === "webkit" ? webkit.launch() : chromium.launch({ channel: process.env.PLAYWRIGHT_CHANNEL || "chromium" });
for (const lang of LANGS) {
const tr = (page, s) => page.evaluate(([k, lang]) => lang === "en" ? k : (I18N[lang][k] ?? window.ROUTING_I18N?.[lang]?.[k] ?? k), [s, lang]);
for (const width of [900, 420]) {
const theme = width === 420 ? "dark" : "light";
test(`${engine} ${lang} ${width}px ${theme}: a provider's In turn says and draws the message going round`, async (t) => {
const browser = await launch();
t.after(() => browser.close());
const page = await (await browser.newContext({ viewport: { width, height: 900 }, reducedMotion: "reduce" })).newPage();
page.setDefaultTimeout(5000);
page.setDefaultNavigationTimeout(60000);
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await page.route("**/*", serve(lang, theme));
await page.goto("http://magpie.test/?view=providers");
await page.locator(".row.provider", { hasText: sub.name }).first().click();
await page.locator(".editor .accts").first().waitFor();
if (lang !== "en") assert.deepEqual(await page.evaluate(([keys, lang]) => keys.filter((k) => !I18N[lang][k]), [[HINTS[0], HINTS[3], HINTS[4]], lang]), [], "translated");
const ed = page.locator(".editor").first();
const routing = ed.locator("label", { hasText: new RegExp(`^${await tr(page, "Routing")}$`) }).locator("xpath=following-sibling::div[1]");
assert.match(await routing.locator(".hint.expl").first().textContent(), SAYS[lang]);
// Auto: each message on to the next, its tool calls with it, a new
// conversation one further along
let f = await fig(routing);
assert.equal(f.affinity, "");
assert.equal(f.msgs, "ABCBCA");
assert.equal(f.calls, "AABBCCBBCCAA");
assert.deepEqual(f.legend, [await tr(page, "Your message"), await tr(page, "Tool calls")]);
await fits(page, ed, "provider");
if (process.env.ARTIFACT_DIR) {
await fs.mkdir(process.env.ARTIFACT_DIR, { recursive: true });
await routing.screenshot({ path: path.join(process.env.ARTIFACT_DIR, `${engine}-${lang}-${width}-provider-rotate.png`) });
}
const stays = ed.locator("label", { hasText: new RegExp(`^${await tr(page, "Stays")}$`) }).locator("xpath=following-sibling::div[1]");
// Session: a whole conversation on one
await stays.locator(".segs .opt", { hasText: new RegExp(`^${await tr(page, "Session")}$`) }).click();
f = await fig(routing);
assert.equal(f.msgs, "AAABBB");
assert.equal(f.calls, "AAAAAABBBBBB");
// Off: every request on to the next
await stays.locator(".segs .opt", { hasText: new RegExp(`^${await tr(page, "Off")}$`) }).click();
f = await fig(routing);
assert.equal(f.msgs, "AAABBB");
assert.equal(f.calls, "BCBCBCCACACA");
// another routing: no figure
await routing.locator(".segs .opt", { hasText: new RegExp(`^${await tr(page, "In order")}$`) }).click();
assert.equal(await routing.locator("svg.rot-fig").count(), 0, "drawn for In turn only");
assert.equal(await routing.locator(".rot-wrap").isHidden(), true);
assert.deepEqual(errors, []);
});
test(`${engine} ${lang} ${width}px ${theme}: a routing group's In turn says and draws the message going round`, async (t) => {
const browser = await launch();
t.after(() => browser.close());
const page = await (await browser.newContext({ viewport: { width, height: 1400 }, reducedMotion: "reduce" })).newPage();
page.setDefaultTimeout(5000);
page.setDefaultNavigationTimeout(60000);
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await page.route("**/*", serve(lang, theme));
await page.goto("http://magpie.test/?view=groups");
const card = page.locator(".rt-group", { hasText: "Sol" });
await card.waitFor();
await card.locator("button", { hasText: new RegExp(`^${await tr(page, "Edit")}$`) }).click();
const adv = page.locator(".rt-gedit .rt-gadv");
await adv.waitFor({ state: "attached" });
if (!(await adv.evaluate((e) => e.open))) await adv.locator(":scope > summary").click();
const ed = page.locator(".rt-gedit");
const routing = ed.locator("label", { hasText: new RegExp(`^${await tr(page, "Routing")}$`) }).locator("xpath=following-sibling::div[1]");
const hint = await routing.locator(".hint").first().textContent();
assert.match(hint, SAYS[lang]);
if (lang !== "en") assert.notEqual(hint, HINTS[1], "translated");
let f = await fig(routing);
assert.equal(f.msgs, "ABCBCA");
await fits(page, ed, "group");
if (process.env.ARTIFACT_DIR) await routing.screenshot({ path: path.join(process.env.ARTIFACT_DIR, `${engine}-${lang}-${width}-group-rotate.png`) });
const stays = ed.locator("label", { hasText: new RegExp(`^${await tr(page, "Stays")}$`) }).locator("xpath=following-sibling::div[1]");
await stays.locator(".segs .opt", { hasText: new RegExp(`^${await tr(page, "Session")}$`) }).click();
f = await fig(routing);
assert.equal(f.affinity, "session");
assert.equal(f.msgs, "AAABBB");
await routing.locator(".segs .opt", { hasText: new RegExp(`^${await tr(page, "Smart")}$`) }).click();
assert.equal(await routing.locator("svg.rot-fig").count(), 0, "drawn for In turn only");
assert.deepEqual(errors, []);
});
}
}
}
+1 -1
View File
@@ -185,7 +185,7 @@
<p>プロバイダーに二つ目のアカウントやキーを追加してオンにすると、編集画面に <span class="ui">ルーティング</span> と <span class="ui">維持</span> が現れ、リクエストをどう分けるかを決めます。</p>
<p>枠が残っているのにレート制限(429)されたものの扱いも選べます。<span class="ui">位置を維持</span> はベンダーの指定どおり休んでから元の位置に戻り、<span class="ui">最後尾へ</span> はレート制限されていないものの後ろに回り、毎回先頭に戻らず負荷が回ります。</p>
<h2 id="routing"><a class="anchor" href="#routing">ルーティング</a></h2>
<ul><li><b><span class="ui">スマート</span></b>(既定):枠に余裕のある間は最初のものが受け、少なくなると残りが最も多いものが引き継ぎます。クレジット切れは 30 分、枠切れはリセットまで、レート制限はベンダーの指定どおり、エラーは 1 分(繰り返すと長く)休みます。</li><li><b><span class="ui">順番</span></b>:最初のものに送り、枠切れ・レート制限・エラーで次が引き継ぎます。</li><li><b><span class="ui">交互</span></b>:会話のターンごとに次へ回して負荷を分けます。ターン内のリクエストは始まった場所に残り、プロンプトキャッシュが保たれます。</li><li><b><span class="ui">使用量が最少のものを優先</span></b>:サブスクリプションは使った枠の割合、キーは直近数時間のトークン数で決めます。</li><li><b><span class="ui">週ペース</span></b>:更新までの 1 時間あたりの残りが最も多いサブスクリプションへ送り、週のリセットで失う分を減らします。90% 以上使ったものはほかが答えられないときまで待ちます。</li><li><b><span class="ui">重み付け</span></b>:各キーの重みで分けます。重み 3 のキーは重み 1 のキーの 3 倍を受けます。キーのみで、アカウントには使えません。</li><li><b><span class="ui">無料優先</span></b>:費用のかからないものを先に使い、それが答えられないときだけ費用のかかるものへ。</li></ul>
<ul><li><b><span class="ui">スマート</span></b>(既定):枠に余裕のある間は最初のものが受け、少なくなると残りが最も多いものが引き継ぎます。クレジット切れは 30 分、枠切れはリセットまで、レート制限はベンダーの指定どおり、エラーは 1 分(繰り返すと長く)休みます。</li><li><b><span class="ui">順番</span></b>:最初のものに送り、枠切れ・レート制限・エラーで次が引き継ぎます。</li><li><b><span class="ui">交互</span></b>:メッセージを送るたびに、リストの順で次のものへ回します。そのメッセージのためのエージェントのツール呼び出しは同じものに残ります。移るたびにプロンプトキャッシュの一部を失います。<span class="ui">維持</span>を<span class="ui">セッション</span>にすると、会話全体が一つに留まります。</li><li><b><span class="ui">使用量が最少のものを優先</span></b>:サブスクリプションは使った枠の割合、キーは直近数時間のトークン数で決めます。</li><li><b><span class="ui">週ペース</span></b>:更新までの 1 時間あたりの残りが最も多いサブスクリプションへ送り、週のリセットで失う分を減らします。90% 以上使ったものはほかが答えられないときまで待ちます。</li><li><b><span class="ui">重み付け</span></b>:各キーの重みで分けます。重み 3 のキーは重み 1 のキーの 3 倍を受けます。キーのみで、アカウントには使えません。</li><li><b><span class="ui">無料優先</span></b>:費用のかからないものを先に使い、それが答えられないときだけ費用のかかるものへ。</li></ul>
<h2 id="stays"><a class="anchor" href="#stays">維持</a></h2>
<p><span class="ui">維持</span> は、会話を答えたアカウントやキーに留めるかを決めます。</p>
<ul><li><b><span class="ui">自動</span></b>(既定):ベンダーのキャッシュに保つ価値がある間は留まり、ターン内では常に留まります。</li><li><b><span class="ui">セッション</span></b>:答えられる限りセッション全体で留まります。</li><li><b><span class="ui">ターン内</span></b>:エージェントがツール結果を返す間は動かず、次に話しかけると改めてルーティングします。</li><li><b><span class="ui">オフ</span></b>:リクエストごとに改めてルーティングします。</li><li><b><span class="ui">厳格</span></b>:レート制限や枠切れでも移らず、エラーがエージェントに届きます。新しい会話は通常どおりです。</li></ul>
+1 -1
View File
@@ -239,7 +239,7 @@
<tr><td>スマート <code>smart</code></td><td>デフォルトです。メンバーのアカウントとキーをまとめて扱い(グループ内のグループは 1 つとして扱います。下記参照)、クォータに余裕のあるサブスクリプションのうち、利用枠が最も早く更新されるもの。基準は週の枠です。週の枠がなく 5 時間枠だけのアカウント(Claude Enterprise)は 5 時間枠で判断されるため、それより後に週の枠が更新されるものすべてより先になります。リセットのないクレジット(WorkBuddy のパッケージはそれぞれの日に失効します)は、残りのうち最も早く失効する時点で判断されるため、クレジットが最も早く失効する WorkBuddy アカウントが先になります。同時に更新されるアカウント(無料アカウントはすべて月末)は、その後に残りのクレジットが先に失効するものが先になります。失敗後に休止中のものは最後に回ります。</td></tr>
<tr><td>順番どおり <code>order</code></td><td>最初のモデルが応答できなくなるまでそれを使い、次へ進みます。</td></tr>
<tr><td>使い切ってから次へ <code>drain</code></td><td>1 つのアカウントやキーを使い切るまで使い、その後は次へ移ってそのまま使い続けます。その間に前のものが回復しても戻りません。レート制限やエラーのものは休止中だけ飛ばします。</td></tr>
<tr><td>持ち回り <code>rotate</code></td><td>各会話の次のターンを、次のメンバーのアカウントやキーに送り、負荷を分散します。</td></tr>
<tr><td>持ち回り <code>rotate</code></td><td>メッセージを送るたびに、次のメンバーのアカウントやキーへ回します。そのメッセージのためのツール呼び出しは同じものに残ります。維持を「セッション」にすると、会話全体が一つに留まります。</td></tr>
<tr><td>使用量の少ない順 <code>usage</code></td><td>利用枠の残りが最も多いアカウントやキー。</td></tr>
<tr><td>期限前に使い切る <code>pace</code></td><td>更新までの 1 時間あたりの週の枠の残りが最も多いアカウント、つまりリセット時に失う分が最も多いもの。これにより各メンバーの週の枠がリセットで無駄になりにくくなります。週の枠がなく 5 時間枠だけのアカウント(Claude Enterprise)は、更新までの 1 時間あたりの 5 時間枠の残りで判断されるので、ほぼ常に最初になります。リセットより早く期限切れになるクレジットがあるアカウントは、最初に期限切れになる分を期限までの 1 時間あたりで数え、そのほうが多ければそれで判断します(WorkBuddy のチェックインで得たクレジットなど)。使用率が 90% 以上のものは、他が応答できなくなるまで待ちます。キーは最近送ったトークン数で判断します。</td></tr>
<tr><td>重み順 <code>weight</code></td><td>グループ編集画面で各モデルの横に設定した重み(1〜1000、未設定は 1)に応じてリクエストを分けます。重み 3 のモデルは重み 1 のモデルが 1 件受けるごとに 3 件受け、まとめてではなく均等に散らします。各モデルは自分のプロバイダーのルーティングで自分のアカウントやキーを使い、グループ内のグループは 1 つとして数えます。失敗して休んでいるものはその回から外れ、失敗したときは次のモデルが代わりに答えます。</td></tr>
+1 -1
View File
@@ -185,7 +185,7 @@
<p>Once a provider has a second account or key switched on, its editor gets <span class="ui">Routing</span> and <span class="ui">Stays</span>, which decide how requests go between them.</p>
<p>You can also choose what one rate limited (429) while it still has quota does: <span class="ui">Keeps its place</span> rests as long as the vendor asks, then takes its place again; <span class="ui">Goes to the back</span> goes behind every one not rate limited since, so the load goes round rather than back to the first each time.</p>
<h2 id="routing"><a class="anchor" href="#routing">Routings</a></h2>
<ul><li><b><span class="ui">Smart</span></b> (default): the first takes requests while it has quota to spare; when it runs low, the one with the most left takes over. One out of credit sits out half an hour, one out of quota until it resets, one rate limited as long as the vendor asks, and one that fails a minute, longer each time it fails again.</li><li><b><span class="ui">In order</span></b>: requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.</li><li><b><span class="ui">In turn</span></b>: each turn of a conversation goes to the next one, spreading the load; the requests within a turn stay where it began, so the prompt cache holds.</li><li><b><span class="ui">Least used first</span></b>: a subscription by the share of its allowance used, a key by the tokens it served in the last hours.</li><li><b><span class="ui">Weekly pace</span></b>: the subscription with the most of its week left per hour until it renews, so less of each week is lost at its reset; one at 90% or more waits until the others can't answer.</li><li><b><span class="ui">By weight</span></b>: by the weight beside each key; a key weighing 3 takes three requests for every one a key weighing 1 takes. Keys only, not accounts.</li><li><b><span class="ui">Free first</span></b>: what costs nothing first, and only when those can't answer one that spends.</li></ul>
<ul><li><b><span class="ui">Smart</span></b> (default): the first takes requests while it has quota to spare; when it runs low, the one with the most left takes over. One out of credit sits out half an hour, one out of quota until it resets, one rate limited as long as the vendor asks, and one that fails a minute, longer each time it fails again.</li><li><b><span class="ui">In order</span></b>: requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.</li><li><b><span class="ui">In turn</span></b>: each message you send goes to the next one, round the list; the agent’s tool calls for it stay on the same one. A move costs some prompt cache; with <span class="ui">Stays</span> on <span class="ui">Session</span>, a whole conversation stays on one instead.</li><li><b><span class="ui">Least used first</span></b>: a subscription by the share of its allowance used, a key by the tokens it served in the last hours.</li><li><b><span class="ui">Weekly pace</span></b>: the subscription with the most of its week left per hour until it renews, so less of each week is lost at its reset; one at 90% or more waits until the others can't answer.</li><li><b><span class="ui">By weight</span></b>: by the weight beside each key; a key weighing 3 takes three requests for every one a key weighing 1 takes. Keys only, not accounts.</li><li><b><span class="ui">Free first</span></b>: what costs nothing first, and only when those can't answer one that spends.</li></ul>
<h2 id="stays"><a class="anchor" href="#stays">Stays</a></h2>
<p><span class="ui">Stays</span> decides whether a conversation stays with the account or key that answered it:</p>
<ul><li><b><span class="ui">Auto</span></b> (default): while what the vendor cached of it is worth keeping; within a turn always.</li><li><b><span class="ui">Session</span></b>: for the whole session, while it can answer.</li><li><b><span class="ui">Within a turn</span></b>: stays put while the agent sends tool results back; routed afresh when you speak again.</li><li><b><span class="ui">Off</span></b>: every request routed afresh.</li><li><b><span class="ui">Strict</span></b>: never moved, even rate limited or out of quota; the error goes to the agent. New conversations are routed as usual.</li></ul>
+1 -1
View File
@@ -239,7 +239,7 @@
<tr><td>Smart <code>smart</code></td><td>The default. Over the members’ accounts and keys together (a group in the group as one, see below): of the subscriptions with quota to spare, the one whose allowance renews soonest. The week decides; an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later. Credits with no reset (WorkBuddy’s packages, each ending on its own day) count as renewing when the soonest of those left run out, so the WorkBuddy account whose credits end first goes first; accounts renewing together (free ones at the month’s end) go by whose credits left end first after that. One resting after a failure goes last.</td></tr>
<tr><td>In order <code>order</code></td><td>The first model until it can’t answer, then the next.</td></tr>
<tr><td>Until used up <code>drain</code></td><td>One account or key until it is used up, then the next, which keeps the requests: one before it that renews meanwhile doesn’t take them back. One rate limited or failing is passed over only while it rests.</td></tr>
<tr><td>In turn <code>rotate</code></td><td>Each conversation’s next turn goes to the next member’s account or key, spreading the load.</td></tr>
<tr><td>In turn <code>rotate</code></td><td>Each message you send goes to the next member’s account or key; the agent’s tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead.</td></tr>
<tr><td>Least used <code>usage</code></td><td>The account or key with the most of its allowance left.</td></tr>
<tr><td>Use before expiry <code>pace</code></td><td>The account with the most of its week left per hour until it renews — the one with the most to lose at its reset — 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. Credits in an account that expire before it resets count too: those that expire first, per hour until they do, when that is the more (WorkBuddy’s check-in credits). One at 90% or more waits until the others can’t answer. A key by the tokens sent it lately.</td></tr>
<tr><td>By weight <code>weight</code></td><td>Each model takes its share of the requests by the weight set beside it in the group editor (1 to 1000, 1 if unset): one weighing 3 takes three for every one a model weighing 1 takes, spread out rather than in bursts. Each model is tried whole over its own accounts or keys, as its provider routes them, and a group in the group counts as one. One resting after a failure leaves the round; the next model is the fallback when one fails.</td></tr>
+1 -1
View File
@@ -185,7 +185,7 @@
<p>给同一个供应商加上第二个账号或第二个 Key 并打开后,它的编辑页会多出 <span class="ui">路由</span> 和 <span class="ui">会话保持</span> 两项,决定请求在这些账号或 Key 之间怎么分。</p>
<p>被限流(429)但还有额度的那个怎么办,也可以选:<span class="ui">保持原位</span>:休息到供应商要求的时间,再回到原来的位置;<span class="ui">排到最后</span>:排到所有没被限流的后面,让负载轮转起来,而不是每次都回到第一个。</p>
<h2 id="routing"><a class="anchor" href="#routing">路由方式</a></h2>
<ul><li><b><span class="ui">智能</span></b>(默认):第一个在额度充足时接请求,额度快用完时由剩得最多的接手。没余额的歇半小时,额度用完的歇到重置,被限流的歇到供应商要求的时间,出错的歇一分钟,再错就更久。</li><li><b><span class="ui">按顺序</span></b>:请求都发给第一个,它额度用完、被限流或出错时由下一个接手。</li><li><b><span class="ui">轮流</span></b>:会话的每一轮交给下一个,均摊负载;一轮之内的请求留在开始的地方,提示缓存不失效。</li><li><b><span class="ui">用量少的优先</span></b>:订阅按已用额度的比例,Key 按最近几小时用掉的 token。</li><li><b><span class="ui">重置前用完</span></b>:交给本周剩余额度按小时算最多的订阅,让每周重置时浪费得最少;用到 90% 以上的,等别的都答不了才用。</li><li><b><span class="ui">按权重</span></b>:按每个 Key 旁边设的权重分,权重 3 的接 3 个请求,权重 1 的接 1 个。只有 Key 能用,账号不行。</li><li><b><span class="ui">免费优先</span></b>:先用不占额度、不花钱的模型,它们答不了时才用花钱的。</li></ul>
<ul><li><b><span class="ui">智能</span></b>(默认):第一个在额度充足时接请求,额度快用完时由剩得最多的接手。没余额的歇半小时,额度用完的歇到重置,被限流的歇到供应商要求的时间,出错的歇一分钟,再错就更久。</li><li><b><span class="ui">按顺序</span></b>:请求都发给第一个,它额度用完、被限流或出错时由下一个接手。</li><li><b><span class="ui">轮流</span></b>:你每发一条消息,就按列表顺序交给下一个;Agent 为这条消息做的工具调用留在同一个上。每换一次会损失部分提示词缓存;<span class="ui">会话保持</span>选<span class="ui">整个会话</span>时,改为整个会话固定在一个上。</li><li><b><span class="ui">用量少的优先</span></b>:订阅按已用额度的比例,Key 按最近几小时用掉的 token。</li><li><b><span class="ui">重置前用完</span></b>:交给本周剩余额度按小时算最多的订阅,让每周重置时浪费得最少;用到 90% 以上的,等别的都答不了才用。</li><li><b><span class="ui">按权重</span></b>:按每个 Key 旁边设的权重分,权重 3 的接 3 个请求,权重 1 的接 1 个。只有 Key 能用,账号不行。</li><li><b><span class="ui">免费优先</span></b>:先用不占额度、不花钱的模型,它们答不了时才用花钱的。</li></ul>
<h2 id="stays"><a class="anchor" href="#stays">会话保持</a></h2>
<p><span class="ui">会话保持</span> 决定一段对话是否留在答过它的那个账号或 Key 上:</p>
<ul><li><b><span class="ui">自动</span></b>(默认):在供应商为它缓存的内容还值得保留时留下,一轮之内总是留下。</li><li><b><span class="ui">整个会话</span></b>:整个会话都留在那里,只要它还能答。</li><li><b><span class="ui">一轮之内</span></b>:Agent 发回工具结果时不动,你再说话时重新路由。</li><li><b><span class="ui">关闭</span></b>:每个请求都重新路由。</li><li><b><span class="ui">严格</span></b>:永远不换,哪怕它被限流或额度用完,错误直接交给 Agent。新会话照常路由。</li></ul>
+1 -1
View File
@@ -239,7 +239,7 @@
<tr><td>智能 <code>smart</code></td><td>默认。把成员的账号和 Key 放在一起排(组里的路由组算一个,见下文):还有余量的订阅里,额度最先重置的排第一。看周额度的重置时间;只有 5 小时额度、没有周额度的账号(如 Claude Enterprise)看它的 5 小时重置,所以排在所有更晚重置的周额度前面。没有重置时间的积分(WorkBuddy 的积分包,各自到期)按剩余积分最早过期的时间算,所以积分最先过期的 WorkBuddy 账号排第一;同时重置的账号(免费账号都在月底)再看剩余积分哪个先过期。失败后在休息的排最后。</td></tr>
<tr><td>按顺序 <code>order</code></td><td>先用第一个模型,它答不了再换下一个。</td></tr>
<tr><td>用完再换 <code>drain</code></td><td>一个账号或 Key 用到额度用完,再换下一个,并一直用它:前面的额度恢复了也不会切回去。被限流或出错的只在休息期间跳过。</td></tr>
<tr><td>轮流 <code>rotate</code></td><td>会话的每一轮交给下一个成员的账号或 Key,均摊负载。</td></tr>
<tr><td>轮流 <code>rotate</code></td><td>你每发一条消息,就交给下一个成员的账号或 Key;Agent 为这条消息做的工具调用留在同一个上。会话保持选「整个会话」时,改为整个会话固定在一个上。</td></tr>
<tr><td>最少使用 <code>usage</code></td><td>剩余额度最多的账号或 Key 排第一。</td></tr>
<tr><td>到期前用完 <code>pace</code></td><td>每周剩余额度除以距重置的小时数,最高的账号排第一——重置时损失最多的那个——少让成员的周额度到重置时作废;只有 5 小时额度、没有周额度的账号(如 Claude Enterprise)按 5 小时窗口的剩余额度除以距它重置的小时数算,所以几乎总排第一。账号里有比重置更早过期的积分时(如 WorkBuddy 签到得的积分),按最先过期的那部分除以距过期的小时数算,比周额度的更高就按它排。用到 90% 以上的等其他账号都答不了时才用。Key 按最近发给它的 token 数排。</td></tr>
<tr><td>按权重 <code>weight</code></td><td>每个模型按群组编辑器里它旁边设的权重(1 到 1000,不设为 1)分得请求:权重 3 的模型每拿三个,权重 1 的拿一个,均匀穿插而不是成批。每个模型按它自己提供方的路由用自己的账号或 Key,群组里的群组算一个成员。失败后歇着的那个退出这一轮;一个失败时,下一个模型接上。</td></tr>
+2 -2
View File
@@ -122,7 +122,7 @@ A group is several models, from one provider or many, that an agent picks as one
| Smart `smart` | The default. Over the members’ accounts and keys together (a group in the group as one, see below): of the subscriptions with quota to spare, the one whose allowance renews soonest. The week decides; an account with five hours and no week (Claude Enterprise) goes by its five hours, so ahead of every week renewing later. Credits with no reset (WorkBuddy’s packages, each ending on its own day) count as renewing when the soonest of those left run out, so the WorkBuddy account whose credits end first goes first; accounts renewing together (free ones at the month’s end) go by whose credits left end first after that. One resting after a failure goes last. |
| In order `order` | The first model until it can’t answer, then the next. |
| Until used up `drain` | One account or key until it is used up, then the next, which keeps the requests: one before it that renews meanwhile doesn’t take them back. One rate limited or failing is passed over only while it rests. |
| In turn `rotate` | Each conversation’s next turn goes to the next member’s account or key, spreading the load. |
| In turn `rotate` | Each message you send goes to the next member’s account or key; the agent’s tool calls for it stay on the same one. With Stays on Session, a whole conversation stays on one instead. |
| Least used `usage` | The account or key with the most of its allowance left. |
| Use before expiry `pace` | The account with the most of its week left per hour until it renews — the one with the most to lose at its reset — 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. Credits in an account that expire before it resets count too: those that expire first, per hour until they do, when that is the more (WorkBuddy’s check-in credits). One at 90% or more waits until the others can’t answer. A key by the tokens sent it lately. |
| By weight `weight` | Each model takes its share of the requests by the weight set beside it in the group editor (1 to 1000, 1 if unset): one weighing 3 takes three for every one a model weighing 1 takes, spread out rather than in bursts. Each model is tried whole over its own accounts or keys, as its provider routes them, and a group in the group counts as one. One resting after a failure leaves the round; the next model is the fallback when one fails. |
@@ -9022,7 +9022,7 @@ You can also choose what one rate limited (429) while it still has quota does: K
- **Smart.** (default): the first takes requests while it has quota to spare; when it runs low, the one with the most left takes over. One out of credit sits out half an hour, one out of quota until it resets, one rate limited as long as the vendor asks, and one that fails a minute, longer each time it fails again.
- **In order.** : requests go to the first; the next takes over when the one before runs out of quota, hits a rate limit or fails.
- **In turn.** : each turn of a conversation goes to the next one, spreading the load; the requests within a turn stay where it began, so the prompt cache holds.
- **In turn.** : each message you send goes to the next one, round the list; the agent’s tool calls for it stay on the same one. A move costs some prompt cache; with Stays on Session, a whole conversation stays on one instead.
- **Least used first.** : a subscription by the share of its allowance used, a key by the tokens it served in the last hours.
- **Weekly pace.** : the subscription with the most of its week left per hour until it renews, so less of each week is lost at its reset; one at 90% or more waits until the others can't answer.
- **By weight.** : by the weight beside each key; a key weighing 3 takes three requests for every one a key weighing 1 takes. Keys only, not accounts.