routing: "Use before expiry" counts credits that expire before the reset (lcyksp)
lcyksp on Discord: the 「重置前用完」 strategy (pace) ranked a WorkBuddy
account by its monthly 500 credits ("积分 0 / 500 · 已用 0% · 28 天后重置").
WorkBuddy spends check-in credits first because they expire sooner
("70.85 积分 将于 2026/11/3 09:28:52 过期"), and the account was ranked as
if nothing would be lost for 28 days.
What changed:
- provider.Allowance.Pace takes a budget window's soonest expiry into
account (Limit.RunsOut, from QuotaWindow.RunsOutAt, which the
WorkBuddy plugin and others set on the credits window). When that
expiry comes before the window's reset, the window's pace is the
higher of:
- what is left per hour until the reset;
- the share that expires (QuotaWindow.RunsOut, now carried as
Limit.RunsOutLeft) per hour until it expires. When the amount isn't
told, all that is left counts. A share is capped at 100%, and the
hours at no less than one.
The account whose credits are lost soonest per hour goes first.
Expiry at or after the reset, or already past, changes nothing.
Zero-config: nothing new to set.
- The trace says DueBy "expiry" when the expiry set the deadline. The
Routing page's reason then reads "Use before expiry: {who} has the most
credits expiring per hour until they expire — {n} of its allowance
expires in {d}."
- Label: "Weekly pace" / 重置前用完 / 週ペース / Wochentempo becomes
"Use before expiry" / 到期前用完 (zh, zh-TW) / 期限前に使い切る /
Vor Ablauf aufbrauchen. Product call: the strategy's goal was always
"lose nothing at the deadline". A reset and an expiry are both such a
deadline, and "到期" covers both, where 「重置」 names only one. The id
stays pace, so saved groups are unchanged.
- The descriptions (Routing, Settings, group editor), docs/reference.md,
docs/subsystems/gateway-routing.md and the site's start page (en, zh,
ja) say the same.
Go, run on mote at base f95bacdfb:
- gofmt -l internal plugins: clean.
- go test -count=1 -timeout 45m on ./internal/provider,
./internal/gateway/..., ./internal/routes, ./plugins/..., ./internal/gui,
./internal/tui and ./internal/cli: all ok except three reds that are
filed and don't touch routing or pace:
- TestCodexPoolSaysTheClientsVersion (#4807)
- TestMainWindowCorners (#3949)
- TestEveryRouteHasACommandOrIsNamed (#4826)
- GOOS=linux and GOOS=windows go vet on the same packages: ok.
- GUI: the touched files (routing-pace-expiry, routing-save,
routing-group-strategy, routing-reset-deadline,
routing-wallet-balance, builtins), chromium and webkit: 90 pass, 0
fail.
- GUI on WSL magpie-desktop (Linux), after the rebase onto 9c58c87e8:
the 387 files that name routing, i18n, strategy or reason text,
chromium and webkit: 6211 tests, 6012 pass, 199 fail in 54 files.
Another session's full suite was running beside it.
- Those 54 files again on mote, with this change and at 9c58c87e8
without it: 100 and 99 reds. They are the same tests, differing only in
which language went red. Filed as #4932. routing-group-strategy, whose
one WSL red was a 9px webkit position, passed both times.
- After the last rebase, onto d29f02d65 (it changed gateway/routing.go,
i18n.js and app.js), on mote: gofmt clean.
- go test ./internal/provider ./internal/routes ./plugins/rotation/...:
ok.
- go test -run "Pace|Reset|Deadline|Expir|Routing|Weekly|Strategy|Order|Allowance"
./internal/gateway: ok.
- linux and windows vet: ok.
- GUI routing-pace-expiry, routing-save, routing-group-strategy,
routing-reset-deadline, routing-wallet-balance, builtins and
i18n-keys: 94 pass, 0 fail.
- c47fc516a (Tencent Cloud's Token Plan) landed after that run and was
not run again with this change.
Broken by hand, each red:
- The expiry branch in Pace taken out: TestPaceCreditsExpiring and
TestPaceGoesByCreditsExpiring.
- dueExpiry left unset: TestPaceGoesByCreditsExpiring's trace check.
- RunsOutLeft not carried: TestAllowanceCarriesRunsOutLeft.
- client.js's expiry reason line taken out: routing-pace-expiry, 0 of 10
pass in chromium.
Not tried:
- A live WorkBuddy account with check-in credits about to expire. The
fixtures use lcyksp's numbers (500 monthly, 70.85 expiring).
- The site pages are not deployed by this commit.
This commit is contained in:
+12
-6
@@ -1717,7 +1717,7 @@ result for every request: who went first, and why.
|
||||
the conversation stays on its account, resting, spent or past its cap,
|
||||
and its errors go to the agent.
|
||||
With *Stays: Session* or *Strict* under Smart, Least used first or
|
||||
Weekly pace, a new conversation goes to the account the fewest other
|
||||
Use before expiry, a new conversation goes to the account the fewest other
|
||||
conversations of the last 30 minutes are on (of those not resting and
|
||||
under 90%), so sessions side by side each keep an account of their own;
|
||||
a Claude Code subagent goes with its session's account.
|
||||
@@ -1726,9 +1726,9 @@ So routing decides who goes first only for a conversation nobody has
|
||||
answered yet. An account that has used 90% goes behind the others for new
|
||||
conversations, but a conversation already on it stays there until 98%.
|
||||
|
||||
**The routings.** Smart, Least used first and Weekly pace go by the share
|
||||
**The routings.** Smart, Least used first and Use before expiry go by the share
|
||||
used of the fullest window that counts the model, the 5-hour window
|
||||
included. Smart and Weekly pace put an account behind the others once a
|
||||
included. Smart and Use before expiry put an account behind the others once a
|
||||
window is at 90% or more, and behind those once one is at 98% or more,
|
||||
each of these groups ordered by the share used.
|
||||
|
||||
@@ -1771,11 +1771,17 @@ each of these groups ordered by the share used.
|
||||
- **Least used first**: the lowest share used first; then the account
|
||||
magpie sent the fewest tokens lately (half of them stop counting after an
|
||||
hour). An account not known counts as unused.
|
||||
- **Weekly pace**: the account with the highest pace first. Pace is the
|
||||
- **Use before expiry**: the account with the highest pace first. Pace is the
|
||||
share of the week left divided by the hours until the week renews (at
|
||||
least 1): 60% left with 20 hours to go is 3 per hour. With two weekly
|
||||
windows that count the model (Opus's own and the general one), the lower
|
||||
pace counts. An account with no week goes by its 5 hours. Accounts whose
|
||||
pace counts. An account with no week goes by its 5 hours. Credits in a
|
||||
window that expire before it renews (WorkBuddy's check-in credits) count
|
||||
as lost then: their share of the window, divided by the hours until they
|
||||
expire (at least 1), is the window's pace when it is the higher, so 70 of
|
||||
500 credits expiring in 14 hours (1 per hour) beat a month's 100% over
|
||||
28 days. When the vendor doesn't say how much expires, all that is left
|
||||
counts. Accounts whose
|
||||
pace is within a tenth of the highest in their band count as alike, and
|
||||
among them the one magpie sent the fewest tokens lately goes first. A
|
||||
Claude account not known goes first once, as in Smart; another unknown
|
||||
@@ -1829,7 +1835,7 @@ depends on the routing:
|
||||
| In turn | Where the rotation goes next. |
|
||||
| Smart | Only between accounts whose windows all renew in the same hours, or whose shares used are equal. |
|
||||
| Least used first | Only between accounts with the same share used and the same tokens sent lately. |
|
||||
| Weekly pace | Only between accounts in the same pace band that magpie sent the same tokens lately, in practice none since magpie started. |
|
||||
| Use before expiry | Only between accounts in the same pace band that magpie sent the same tokens lately, in practice none since magpie started. |
|
||||
| Speed first | Only between those within a tenth of each other's speed, and among those not measured lately. |
|
||||
| Cheapest first | Only between those that cost the same now, and among those with no known price. |
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -912,7 +912,7 @@ func withLead(key string, cs []candidate, pl planned) ([]candidate, planned) {
|
||||
// spreadsSessions says whether new conversations kept for the whole
|
||||
// session (Stays: Session or Strict) go to the key, account or member the
|
||||
// fewest others are on (leastHeld), under a routing that picks by what
|
||||
// each has left: Smart, Least used first, Weekly pace. Several sessions
|
||||
// each has left: Smart, Least used first, Use before expiry. Several sessions
|
||||
// started side by side then each keep an account of their own until its
|
||||
// allowance runs out, as a user picking the mode with several accounts
|
||||
// expects (connor_yang on Discord: three sessions on two of three
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/yetone/magpie/internal/provider"
|
||||
)
|
||||
|
||||
// Use before expiry (Pace) takes credits that expire before their window
|
||||
// renews for that window's deadline: what expires, as a share of the
|
||||
// window, per hour until it does. lcyksp on Discord: a WorkBuddy month of
|
||||
// 500 credits renewing in 28 days, 70.85 check-in credits in it expiring
|
||||
// tomorrow morning, was billed after an account whose month had more to
|
||||
// lose per hour, so the check-in credits lapsed unspent. Credits that
|
||||
// expire after the window renews change nothing, nor do a few credits
|
||||
// expiring when the month has more to lose; when the amount isn't told,
|
||||
// all that is left is taken as lost then, as Smart's Renewal takes it.
|
||||
// The trace says the deadline is the expiry.
|
||||
func TestPaceGoesByCreditsExpiring(t *testing.T) {
|
||||
old := allowances
|
||||
defer func() { allowances = old }()
|
||||
now := time.Now()
|
||||
share := map[string]provider.Allowance{}
|
||||
allowances = func(string) map[string]provider.Allowance { return share }
|
||||
const model = "deepseek-v4.1-flash"
|
||||
p := provider.Provider{ID: "workbuddy", Routing: provider.Pace, Account: &provider.Account{Agent: "workbuddy", User: "a@x.com"}}
|
||||
acct := func(user string) candidate {
|
||||
return candidate{p: provider.Provider{ID: "workbuddy", Account: &provider.Account{Agent: "workbuddy", User: user}}, model: model, rest: "workbuddy#" + user}
|
||||
}
|
||||
month := func(used float64, renews time.Duration) provider.Allowance {
|
||||
return provider.Allowance{{Used: used, Amount: 500 * used / 100, Of: 500, Unit: "credits", Resets: now.Add(renews), Name: "Credits"}}
|
||||
}
|
||||
order := func() (string, weighing, []candidate) {
|
||||
got, wg := weigh(p, []candidate{acct("b@x.com"), acct("a@x.com")}, model, provider.Chat)
|
||||
var s []string
|
||||
for _, c := range got {
|
||||
s = append(s, c.p.Account.User[:1])
|
||||
}
|
||||
return strings.Join(s, ""), wg, got
|
||||
}
|
||||
// B: half its month left, renewing in ten days: 50/240h ≈ 0.21 an
|
||||
// hour, ahead of A's 100/672h ≈ 0.15 when nothing of A's expires
|
||||
share["b@x.com"] = month(50, 10*24*time.Hour)
|
||||
share["a@x.com"] = month(0, 28*24*time.Hour)
|
||||
if got, _, _ := order(); got != "ba" {
|
||||
t.Fatalf("nothing expiring: %s", got)
|
||||
}
|
||||
|
||||
// the report: 70.85 of A's credits expire in 14 hours, 14% of its
|
||||
// 500 lost then, 1% an hour
|
||||
share["a@x.com"][0].RunsOut, share["a@x.com"][0].RunsOutLeft = now.Add(14*time.Hour), 70.85
|
||||
got, wg, cs := order()
|
||||
if got != "ab" {
|
||||
t.Fatalf("credits expiring tomorrow go first: %s", got)
|
||||
}
|
||||
w := weighed(cs[0], p, wg, false, provider.Chat)
|
||||
if w.DueBy != "expiry" || w.Due == nil || !w.Due.Equal(now.Add(14*time.Hour)) {
|
||||
t.Fatalf("trace: due %v by %q", w.Due, w.DueBy)
|
||||
}
|
||||
if b := weighed(cs[1], p, wg, false, provider.Chat); b.DueBy != "" {
|
||||
t.Fatalf("trace: B by %q", b.DueBy)
|
||||
}
|
||||
|
||||
// the amount not told: all A has left is taken as lost then
|
||||
share["a@x.com"][0].RunsOutLeft = 0
|
||||
if got, _, _ := order(); got != "ab" {
|
||||
t.Fatalf("amount not told: %s", got)
|
||||
}
|
||||
|
||||
// one credit expiring: 0.2% over 14h is less than A's month per hour,
|
||||
// so its month decides, and B goes first
|
||||
share["a@x.com"][0].RunsOutLeft = 1
|
||||
if got, wg, cs = order(); got != "ba" {
|
||||
t.Fatalf("a credit expiring: %s", got)
|
||||
}
|
||||
if w := weighed(cs[1], p, wg, false, provider.Chat); w.DueBy != "" {
|
||||
t.Fatalf("trace, month decides: by %q", w.DueBy)
|
||||
}
|
||||
|
||||
// expiring after the month renews: lost to the reset first, nothing
|
||||
// changes
|
||||
share["a@x.com"][0].RunsOut, share["a@x.com"][0].RunsOutLeft = now.Add(30*24*time.Hour), 70.85
|
||||
if got, _, _ := order(); got != "ba" {
|
||||
t.Fatalf("expiring after the renewal: %s", got)
|
||||
}
|
||||
|
||||
// expired already: nothing changes
|
||||
share["a@x.com"][0].RunsOut = now.Add(-time.Hour)
|
||||
if got, _, _ := order(); got != "ba" {
|
||||
t.Fatalf("expired already: %s", got)
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
// A Codex account that spends a reset about to run out by itself (auto-use
|
||||
// on, its windows used) loses what its week has left when that reset is
|
||||
// spent, resetLead (half an hour unless set) before it runs out: Weekly pace and Smart take
|
||||
// spent, resetLead (half an hour unless set) before it runs out: Use before expiry and Smart take
|
||||
// that for its deadline when it is sooner than the week renews (#717,
|
||||
// #718, thedavidweng: A with 80% left renewing in five days and a reset
|
||||
// running out that afternoon went behind B with 50% left renewing in two).
|
||||
|
||||
@@ -1995,9 +1995,10 @@ type left struct {
|
||||
due time.Time // when the window that pace went by renews; zero when not known
|
||||
// restarts: when an auto-used reset starts its windows again
|
||||
// (Allowance.Restarts), zero when none will; dueRestart: due is that,
|
||||
// sooner than the window renews by itself
|
||||
restarts time.Time
|
||||
dueRestart bool
|
||||
// sooner than the window renews by itself; dueExpiry: due is when
|
||||
// credits in it expire, sooner than it renews (Allowance.Pace)
|
||||
restarts time.Time
|
||||
dueRestart, dueExpiry bool
|
||||
// the count used is the share of, when the vendor counts it so
|
||||
// (Allowance.Count): amount of of, in unit
|
||||
amount, of float64
|
||||
@@ -2086,6 +2087,7 @@ func weighRouted(p provider.Provider, cs []candidate, model string, from provide
|
||||
rs := a.Restarts(now)
|
||||
l := left{used: u, renews: r, fullest: a.Fullest(c.model, now), soon: a.Renewal(c.model, now), lapse: a.Lapse(c.model, now), pace: pc, due: due, amount: amt, of: of, unit: unit,
|
||||
restarts: rs, dueRestart: !rs.IsZero() && due.Equal(rs), credits: spendsCredits(c.p, a)} // one not known counts as unused
|
||||
l.dueExpiry = !l.dueRestart && !l.lapse.IsZero() && due.Equal(l.lapse)
|
||||
l.first = l.credits && provider.CodexCreditsFirst(c.p.Account.User)
|
||||
if b, bu, has := a.Left(c.model); has {
|
||||
// a wallet's figure is weighed only against the same
|
||||
|
||||
@@ -314,7 +314,9 @@ type Weighed struct {
|
||||
// allowance (#3749)
|
||||
Window int `json:"window,omitempty"`
|
||||
// DueBy: "reset" when Due is when an auto-used Codex reset about to
|
||||
// run out starts the windows again, sooner than they renew (#717)
|
||||
// run out starts the windows again, sooner than they renew (#717);
|
||||
// "expiry" when it is when credits in them expire, sooner than they
|
||||
// renew (Allowance.Pace)
|
||||
DueBy string `json:"dueBy,omitempty"`
|
||||
// Restarts: when that reset starts them again, set when it is sooner
|
||||
// than its biggest window renews — Smart goes by it then (#718)
|
||||
@@ -531,8 +533,11 @@ func weighed(c candidate, p provider.Provider, wg weighing, fallback bool, from
|
||||
if !l.due.IsZero() {
|
||||
due := l.due
|
||||
w.Due = &due
|
||||
if l.dueRestart {
|
||||
switch {
|
||||
case l.dueRestart:
|
||||
w.DueBy = "reset"
|
||||
case l.dueExpiry:
|
||||
w.DueBy = "expiry"
|
||||
}
|
||||
}
|
||||
if rs := l.restarts; !rs.IsZero() && len(l.soon) > 0 && rs.Equal(l.soon[0]) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/yetone/magpie/internal/provider"
|
||||
)
|
||||
|
||||
// Weekly pace puts first the account with the most of its week left per
|
||||
// Use before expiry puts first the account with the most of its week left per
|
||||
// hour until it renews — the one with the most to lose at its reset — not
|
||||
// the one with the most left: 20% left and an hour to go beats 60% left
|
||||
// and five days. Alike within a tenth go by the tokens sent lately, then
|
||||
|
||||
@@ -11893,7 +11893,7 @@ const ROUTINGS = [
|
||||
["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."],
|
||||
["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", "Weekly pace", "Each request goes to the subscription 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 week is lost at its reset; one at 90% or more waits until the others can't answer. A key goes 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 — its week at its reset, or credits in it that expire sooner — so less is lost to resets and expiry; one at 90% or more waits until the others can't answer. 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."],
|
||||
|
||||
+12
-12
@@ -877,7 +877,7 @@ const I18N = {
|
||||
"Send each request's traces and metrics to an OpenTelemetry collector, such as Langfuse": "把每个请求的追踪和指标发送到 OpenTelemetry 收集器,比如 Langfuse",
|
||||
"Sending to a collector": "正在发送到收集器",
|
||||
"Routing strategies": "路由策略",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Weekly pace, By weight, Free first, Speed first and Cheapest first": "智能以外的路由方式:按顺序、用完再换、轮流、用量少的优先、重置前用完、按权重、免费优先、速度优先和最便宜优先",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Use before expiry, By weight, Free first, Speed first and Cheapest first": "智能以外的路由方式:按顺序、用完再换、轮流、用量少的优先、到期前用完、按权重、免费优先、速度优先和最便宜优先",
|
||||
"1 provider or group routed so": "1 个提供商或路由组在用",
|
||||
"{n} providers and groups routed so": "{n} 个提供商和路由组在用",
|
||||
"Run the JavaScript gateway plugins: middleware on agents' requests and replies, routings and usage observers": "运行 JavaScript 网关插件:Agent 请求和回复上的中间件、路由方式和用量观察者",
|
||||
@@ -1823,8 +1823,8 @@ const I18N = {
|
||||
"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 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 数。",
|
||||
"Weekly pace": "重置前用完",
|
||||
"Each request goes to the subscription 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 week is lost at its reset; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "每个请求发给周剩余额度 ÷ 距重置小时数最高的订阅;用到 90% 以上的,等其他都无法响应时才用。密钥按最近几小时处理的 token 数排序。",
|
||||
"Use before expiry": "到期前用完",
|
||||
"Each request goes to the subscription with the most left per hour until it is lost — its week at its reset, or credits in it that expire sooner — so less is lost to resets and expiry; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "每个请求发给剩余额度 ÷ 距作废小时数最高的订阅——周额度在重置时作废,更早过期的积分按过期时间算;用到 90% 以上的,等其他都无法响应时才用。密钥按最近几小时处理的 token 数排序。",
|
||||
"The gateway now uses {user} first": "网关现在优先使用 {user}",
|
||||
"{agent} signs in to the first. Tick more and magpie moves on to the next when the one before it is out of quota. Sessions already running keep theirs until restarted.": "{agent} 登录首选账号;勾选多个时,前一个额度用完 magpie 自动换下一个。已在运行的会话保持原账号,重启后切换。",
|
||||
"{agent} is signed in to this account": "{agent} 当前登录的就是这个账号",
|
||||
@@ -5301,7 +5301,7 @@ const I18N = {
|
||||
"Send each request's traces and metrics to an OpenTelemetry collector, such as Langfuse": "把每個請求的追蹤和指標傳送到 OpenTelemetry 收集器,例如 Langfuse",
|
||||
"Sending to a collector": "正在傳送到收集器",
|
||||
"Routing strategies": "路由策略",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Weekly pace, By weight, Free first, Speed first and Cheapest first": "智慧以外的路由方式:按順序、用完再換、輪流、用量少的優先、重置前用完、按權重、免費優先、速度優先和最便宜優先",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Use before expiry, By weight, Free first, Speed first and Cheapest first": "智慧以外的路由方式:按順序、用完再換、輪流、用量少的優先、到期前用完、按權重、免費優先、速度優先和最便宜優先",
|
||||
"1 provider or group routed so": "1 個提供商或路由組在用",
|
||||
"{n} providers and groups routed so": "{n} 個提供商和路由組在用",
|
||||
"Run the JavaScript gateway plugins: middleware on agents' requests and replies, routings and usage observers": "執行 JavaScript 閘道外掛:Agent 請求和回覆上的中介軟體、路由方式和用量觀察者",
|
||||
@@ -6236,8 +6236,8 @@ const I18N = {
|
||||
"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 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 數。",
|
||||
"Weekly pace": "重置前用完",
|
||||
"Each request goes to the subscription 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 week is lost at its reset; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "每個請求發給週剩餘額度 ÷ 距重置小時數最高的訂閱;用到 90% 以上的,等其他都無法回應時才用。金鑰按最近幾小時處理的 token 數排序。",
|
||||
"Use before expiry": "到期前用完",
|
||||
"Each request goes to the subscription with the most left per hour until it is lost — its week at its reset, or credits in it that expire sooner — so less is lost to resets and expiry; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "每個請求發給剩餘額度 ÷ 距作廢小時數最高的訂閱——週額度在重置時作廢,更早過期的點數按過期時間算;用到 90% 以上的,等其他都無法回應時才用。金鑰按最近幾小時處理的 token 數排序。",
|
||||
"The gateway now uses {user} first": "閘道現在優先使用 {user}",
|
||||
"{agent} signs in to the first. Tick more and magpie moves on to the next when the one before it is out of quota. Sessions already running keep theirs until restarted.": "{agent} 登入首選帳號;勾選多個時,前一個額度用完 magpie 自動換下一個。已在執行的會話保持原帳號,重啟後切換。",
|
||||
"{agent} is signed in to this account": "{agent} 目前登入的就是這個帳號",
|
||||
@@ -9696,7 +9696,7 @@ const I18N = {
|
||||
"Send each request's traces and metrics to an OpenTelemetry collector, such as Langfuse": "各リクエストのトレースとメトリクスを Langfuse などの OpenTelemetry コレクターに送ります",
|
||||
"Sending to a collector": "コレクターに送信中",
|
||||
"Routing strategies": "ルーティング戦略",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Weekly pace, By weight, Free first, Speed first and Cheapest first": "スマート以外のルーティング:順番、使い切ってから次へ、交互、使用量が最少のものを優先、週ペース、重み付け、無料優先、速度優先、最安優先",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Use before expiry, By weight, Free first, Speed first and Cheapest first": "スマート以外のルーティング:順番、使い切ってから次へ、交互、使用量が最少のものを優先、期限前に使い切る、重み付け、無料優先、速度優先、最安優先",
|
||||
"1 provider or group routed so": "1 個のプロバイダーまたはグループが使用中",
|
||||
"{n} providers and groups routed so": "{n} 個のプロバイダーとグループが使用中",
|
||||
"Run the JavaScript gateway plugins: middleware on agents' requests and replies, routings and usage observers": "JavaScript ゲートウェイプラグインを実行します:エージェントのリクエストと応答のミドルウェア、ルーティング、使用量オブザーバー",
|
||||
@@ -10625,8 +10625,8 @@ const I18N = {
|
||||
"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 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.": "各リクエストは使用量が最も少ないものに送られます。サブスクリプションは利用枠の使用割合、キーは直近数時間に処理したトークン数で判断します。",
|
||||
"Weekly pace": "週ペース",
|
||||
"Each request goes to the subscription 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 week is lost at its reset; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "各リクエストは、更新までの1時間あたりの週残量が最も多いサブスクリプション(リセット時に失う分が最も多いもの)に送られ、リセット時に無駄になる週の枠を減らします。90% 以上使用したものは他が応答できないときまで待機します。キーは直近数時間に処理したトークン数で判断します。",
|
||||
"Use before expiry": "期限前に使い切る",
|
||||
"Each request goes to the subscription with the most left per hour until it is lost — its week at its reset, or credits in it that expire sooner — so less is lost to resets and expiry; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "各リクエストは、失われるまでの1時間あたりの残りが最も多いサブスクリプションに送られます — 週の枠はリセットで、それより早く期限切れになるクレジットはその期限で失われるため、リセットや期限切れで無駄になる分を減らします。90% 以上使用したものは他が応答できないときまで待機します。キーは直近数時間に処理したトークン数で判断します。",
|
||||
"The gateway now uses {user} first": "ゲートウェイは {user} を最初に使うようになりました",
|
||||
"{agent} signs in to the first. Tick more and magpie moves on to the next when the one before it is out of quota. Sessions already running keep theirs until restarted.": "{agent} は最初のアカウントにサインインします。複数チェックすると、前のアカウントのクォータが切れたときに magpie が次へ切り替えます。実行中のセッションは再起動するまで元のアカウントのままです。",
|
||||
"{agent} is signed in to this account": "{agent} はこのアカウントにサインインしています",
|
||||
@@ -14106,7 +14106,7 @@ const I18N = {
|
||||
"Send each request's traces and metrics to an OpenTelemetry collector, such as Langfuse": "Traces und Metriken jeder Anfrage an einen OpenTelemetry-Collector senden, etwa Langfuse",
|
||||
"Sending to a collector": "Sendet an einen Collector",
|
||||
"Routing strategies": "Routing-Strategien",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Weekly pace, By weight, Free first, Speed first and Cheapest first": "Die Routings neben Intelligent: Der Reihe nach, Bis aufgebraucht, Abwechselnd, Am wenigsten genutzte zuerst, Wochentempo, Nach Gewicht, Kostenlos zuerst, Schnellste zuerst und Günstigste zuerst",
|
||||
"The routings besides Smart: In order, Until used up, In turn, Least used first, Use before expiry, By weight, Free first, Speed first and Cheapest first": "Die Routings neben Intelligent: Der Reihe nach, Bis aufgebraucht, Abwechselnd, Am wenigsten genutzte zuerst, Vor Ablauf aufbrauchen, Nach Gewicht, Kostenlos zuerst, Schnellste zuerst und Günstigste zuerst",
|
||||
"1 provider or group routed so": "1 Anbieter oder Gruppe so geroutet",
|
||||
"{n} providers and groups routed so": "{n} Anbieter und Gruppen so geroutet",
|
||||
"Run the JavaScript gateway plugins: middleware on agents' requests and replies, routings and usage observers": "Die JavaScript-Gateway-Plugins ausführen: Middleware auf Anfragen und Antworten der Agenten, Routings und Nutzungsbeobachter",
|
||||
@@ -15045,8 +15045,8 @@ const I18N = {
|
||||
"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 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.",
|
||||
"Weekly pace": "Wochentempo",
|
||||
"Each request goes to the subscription 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 week is lost at its reset; one at 90% or more waits until the others can't answer. A key goes by the tokens it served in the last hours.": "Jede Anfrage geht an das Abo, das pro Stunde bis zur Erneuerung am meisten von seiner Woche übrig hat — also das, das beim Reset am meisten verlieren würde —, damit beim Reset weniger von jeder Woche verfällt; eines mit 90 % oder mehr wartet, bis die anderen nicht antworten können. Ein Schlüssel richtet sich 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 — its week at its reset, or credits in it that expire sooner — so less is lost to resets and expiry; one at 90% or more waits until the others can't answer. 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 wartet, bis die anderen nicht antworten können. Ein Schlüssel richtet sich nach den Token, die er in den letzten Stunden geliefert hat.",
|
||||
"The gateway now uses {user} first": "Der Zugangspunkt verwendet jetzt zuerst {user}",
|
||||
"{agent} signs in to the first. Tick more and magpie moves on to the next when the one before it is out of quota. Sessions already running keep theirs until restarted.": "{agent} meldet sich beim ersten an. Haken Sie weitere an, wechselt magpie zum nächsten, sobald das vorherige kein Kontingent mehr hat. Laufende Sitzungen behalten ihres bis zum Neustart.",
|
||||
"{agent} is signed in to this account": "{agent} ist bei diesem Konto angemeldet",
|
||||
|
||||
@@ -533,7 +533,7 @@ function routingPage(part) {
|
||||
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."],
|
||||
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: ["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."],
|
||||
// a provider's keys or a subscription's accounts by weight (#841,
|
||||
// rubbzha on X); both strings as the provider editor's routing options
|
||||
@@ -789,13 +789,14 @@ function routingPage(part) {
|
||||
if (f.known) {
|
||||
// The allowance window used for pace, which may be shorter than a week.
|
||||
const left = known0(f.due) ? Math.min(100, Math.round((f.pace || 0) * Math.max(1, (at(f.due) - at(r.time)) / 36e5))) : null;
|
||||
if (left !== null && f.dueBy === "reset") return t("Weekly pace: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.", { who: w, n: pct(left), d: dur(at(f.due) - at(r.time)) });
|
||||
if (left !== null && f.dueBy === "expiry") return t("Use before expiry: {who} has the most credits expiring per hour until they expire — {n} of its allowance expires in {d}.", { who: w, n: pct(left), d: dur(at(f.due) - at(r.time)) });
|
||||
if (left !== null && f.dueBy === "reset") return t("Use before expiry: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.", { who: w, n: pct(left), d: dur(at(f.due) - at(r.time)) });
|
||||
return left !== null
|
||||
? t("Weekly pace: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.", { who: w, n: pct(left), d: dur(at(f.due) - at(r.time)) })
|
||||
: t("Weekly pace: {who} has the most remaining allowance per hour until reset — {n} used.", { who: w, n: pct(f.used) });
|
||||
? t("Use before expiry: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.", { who: w, n: pct(left), d: dur(at(f.due) - at(r.time)) })
|
||||
: t("Use before expiry: {who} has the most remaining allowance per hour until reset — {n} used.", { who: w, n: pct(f.used) });
|
||||
}
|
||||
if (f.kind === "key" && !someKnown) return t("Weekly pace: {who} served the fewest tokens lately — {n}.", { who: w, n: tokens(f.tokens || 0) });
|
||||
return t("Weekly pace: {who} goes first.", { who: w });
|
||||
if (f.kind === "key" && !someKnown) return t("Use before expiry: {who} served the fewest tokens lately — {n}.", { who: w, n: tokens(f.tokens || 0) });
|
||||
return t("Use before expiry: {who} goes first.", { who: w });
|
||||
}
|
||||
// keys that read their own windows (a sub2api key's limits) are
|
||||
// weighed by them, as accounts are, and one not read yet beside them
|
||||
@@ -5124,7 +5125,7 @@ function routingPage(part) {
|
||||
// after the requests: a request picked in the list plays on the stage,
|
||||
// so the list sits right under it
|
||||
more.append(gsec);
|
||||
const ROUTE_OPTS = [["", "Smart"], ["order", "In order"], ["drain", "Until used up"], ["rotate", "In turn"], ["usage", "Least used"], ["pace", "Weekly pace"], ["free", "Free first"], ["fast", "Speed first"]];
|
||||
const ROUTE_OPTS = [["", "Smart"], ["order", "In order"], ["drain", "Until used up"], ["rotate", "In turn"], ["usage", "Least used"], ["pace", "Use before expiry"], ["free", "Free first"], ["fast", "Speed first"]];
|
||||
// a group may also be routed by hand: every request to the member the
|
||||
// user picks on its card (provider.Manual, #317) — a provider's keys can't
|
||||
// and by its members' weights, as a provider's keys are (#1910)
|
||||
@@ -5168,7 +5169,7 @@ function routingPage(part) {
|
||||
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.",
|
||||
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: "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,
|
||||
free: "Free first: the members whose model its vendor serves at no cost to the subscription's allowance or credits go first, then the rest — each whole, over its own accounts or keys as its provider routes them. The free ones are tried before any that spends, so nothing that costs nothing is left unused.",
|
||||
fast: "Speed first: the member that answered fastest lately goes first, by its time to the first token and how fast it writes, each of its accounts or keys weighed on its own; those within a tenth keep their listed order, and one not measured lately gets one request in five, so it is measured again.",
|
||||
|
||||
@@ -366,7 +366,7 @@ magpie.strings({
|
||||
"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,均摊负载。",
|
||||
"Least used first: the account or key with the most of its allowance left goes first.": "最少使用优先:剩余额度最多的账号或 Key 排第一。",
|
||||
"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.": "重置前用完:按周剩余额度 ÷ 距重置小时数排序,越高越先用。只有 5 小时额度的账号(如 Claude Enterprise)按 5 小时窗口计算,几乎总排第一;Key 按最近发给它的 token 数排。",
|
||||
"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 比较),选中后按其自身顺序整体尝试。成员中路由留在“智能”的路由组,按本组的路由走,除非本组是“按顺序”“按权重”或“手动”。",
|
||||
"errors your agent saw": "Agent 收到的错误",
|
||||
"It said: {error}": "原话:{error}",
|
||||
@@ -432,7 +432,7 @@ magpie.strings({
|
||||
"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.": "轮流:会话的下一轮交给上一轮回答者的下一个账号,新会话再往后一个;一轮之内不换账号,保持提示词缓存。",
|
||||
"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 数排。",
|
||||
"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.": "重置前用完:按周剩余额度 ÷ 距重置小时数排序,越高越先用;只有 5 小时额度的账号按 5 小时窗口计算。用到 90% 以上的,等其他都无法响应时才用;Key 按最近发给它的 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}。",
|
||||
"{who} is the only one, so it's tried though it is resting.": "只有 {who} 一个,虽在休息仍会尝试。",
|
||||
"{who} is the only account on for {model} — nothing to choose between.": "{who} 是 {model} 唯一启用的账号,无需选择。",
|
||||
@@ -447,11 +447,12 @@ magpie.strings({
|
||||
"Least used first: {who} has the most of its allowance left — {n} used.": "最少使用优先:{who} 剩余额度最多,已用 {n}。",
|
||||
"Least used first: {who} served the fewest tokens lately — {n}.": "最少使用优先:{who} 最近处理的 token 最少({n})。",
|
||||
"Least used first: {who} goes first.": "最少使用优先:{who} 排第一。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "重置前用完:{who} 的剩余额度 ÷ 距重置小时数最高,剩余 {n},{d} 后重置。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "重置前用完:{who} 的剩余额度 ÷ 距自动使用快到期 Codex 重置卡的小时数最高,剩余 {n},{d} 后自动使用。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} used.": "重置前用完:{who} 的剩余额度 ÷ 距重置小时数最高,已用 {n}。",
|
||||
"Weekly pace: {who} served the fewest tokens lately — {n}.": "重置前用完:{who} 最近处理的 token 最少({n})。",
|
||||
"Weekly pace: {who} goes first.": "重置前用完:{who} 排第一。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "到期前用完:{who} 的剩余额度 ÷ 距重置小时数最高,剩余 {n},{d} 后重置。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "到期前用完:{who} 的剩余额度 ÷ 距自动使用快到期 Codex 重置卡的小时数最高,剩余 {n},{d} 后自动使用。",
|
||||
"Use before expiry: {who} has the most credits expiring per hour until they expire — {n} of its allowance expires in {d}.": "到期前用完:{who} 快过期的积分 ÷ 距过期小时数最高,额度的 {n} 将在 {d} 后过期。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} used.": "到期前用完:{who} 的剩余额度 ÷ 距重置小时数最高,已用 {n}。",
|
||||
"Use before expiry: {who} served the fewest tokens lately — {n}.": "到期前用完:{who} 最近处理的 token 最少({n})。",
|
||||
"Use before expiry: {who} goes first.": "到期前用完:{who} 排第一。",
|
||||
"{who} goes first: it's made for {api}, the API {model} is at home in, so nothing is translated.": "{who} 排第一:它专为 {api} 而设,正是 {model} 的原生 API,无需转换。",
|
||||
"{who} goes first: keys go in their order, those that suit the request first.": "{who} 排第一:Key 按顺序排,适合此请求的在前。",
|
||||
"{who} goes first.": "{who} 排第一。",
|
||||
@@ -1019,7 +1020,7 @@ magpie.strings({
|
||||
"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,均攤負載。",
|
||||
"Least used first: the account or key with the most of its allowance left goes first.": "最少使用優先:剩餘額度最多的帳號或 Key 排第一。",
|
||||
"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.": "重置前用完:按週剩餘額度 ÷ 距重置小時數排序,越高越先用。只有 5 小時額度的帳號(如 Claude Enterprise)按 5 小時時段計算,幾乎總排第一;Key 按最近發給它的 token 數排。",
|
||||
"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 比較),選中後按其自身順序整體嘗試。成員中路由留在「智慧」的路由組,按本組的路由走,除非本組是「按順序」「按權重」或「手動」。",
|
||||
"errors your agent saw": "Agent 收到的錯誤",
|
||||
"It said: {error}": "原話:{error}",
|
||||
@@ -1085,7 +1086,7 @@ magpie.strings({
|
||||
"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.": "輪流:會話的下一輪交給上一輪迴答者的下一個帳號,新會話再往後一個;一輪之內不換帳號,保持提示詞快取。",
|
||||
"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 數排。",
|
||||
"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.": "重置前用完:按週剩餘額度 ÷ 距重置小時數排序,越高越先用;只有 5 小時額度的帳號按 5 小時時段計算。用到 90% 以上的,等其他都無法回應時才用;Key 按最近發給它的 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}。",
|
||||
"{who} is the only one, so it's tried though it is resting.": "只有 {who} 一個,雖在休息仍會嘗試。",
|
||||
"{who} is the only account on for {model} — nothing to choose between.": "{who} 是 {model} 唯一啟用的帳號,無需選擇。",
|
||||
@@ -1100,11 +1101,12 @@ magpie.strings({
|
||||
"Least used first: {who} has the most of its allowance left — {n} used.": "最少使用優先:{who} 剩餘額度最多,已用 {n}。",
|
||||
"Least used first: {who} served the fewest tokens lately — {n}.": "最少使用優先:{who} 最近處理的 token 最少({n})。",
|
||||
"Least used first: {who} goes first.": "最少使用優先:{who} 排第一。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "重置前用完:{who} 的剩餘額度 ÷ 距重置小時數最高,剩餘 {n},{d} 後重置。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "重置前用完:{who} 的剩餘額度 ÷ 距自動使用快到期 Codex 重置卡的小時數最高,剩餘 {n},{d} 後自動使用。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} used.": "重置前用完:{who} 的剩餘額度 ÷ 距重置小時數最高,已用 {n}。",
|
||||
"Weekly pace: {who} served the fewest tokens lately — {n}.": "重置前用完:{who} 最近處理的 token 最少({n})。",
|
||||
"Weekly pace: {who} goes first.": "重置前用完:{who} 排第一。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "到期前用完:{who} 的剩餘額度 ÷ 距重置小時數最高,剩餘 {n},{d} 後重置。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "到期前用完:{who} 的剩餘額度 ÷ 距自動使用快到期 Codex 重置卡的小時數最高,剩餘 {n},{d} 後自動使用。",
|
||||
"Use before expiry: {who} has the most credits expiring per hour until they expire — {n} of its allowance expires in {d}.": "到期前用完:{who} 快過期的點數 ÷ 距過期小時數最高,額度的 {n} 將在 {d} 後過期。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} used.": "到期前用完:{who} 的剩餘額度 ÷ 距重置小時數最高,已用 {n}。",
|
||||
"Use before expiry: {who} served the fewest tokens lately — {n}.": "到期前用完:{who} 最近處理的 token 最少({n})。",
|
||||
"Use before expiry: {who} goes first.": "到期前用完:{who} 排第一。",
|
||||
"{who} goes first: it's made for {api}, the API {model} is at home in, so nothing is translated.": "{who} 排第一:它專為 {api} 而設,正是 {model} 的原生 API,無需轉換。",
|
||||
"{who} goes first: keys go in their order, those that suit the request first.": "{who} 排第一:Key 按順序排,適合此請求的在前。",
|
||||
"{who} goes first.": "{who} 排第一。",
|
||||
@@ -1670,7 +1672,7 @@ magpie.strings({
|
||||
"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.": "交互:各会話の次のターンを次のメンバーのアカウントやキーに送り、負荷を分散します。",
|
||||
"Least used first: the account or key with the most of its allowance left goes first.": "使用量が最少を優先:利用枠の残りが最も多いアカウントやキーが先頭です。",
|
||||
"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.": "週ペース:リセットまでの 1 時間あたりの週の残りが最も多いアカウントが先頭になるため、各メンバーの週の枠がリセットで失われる分が減ります。5 時間枠のみで週の枠がないアカウント(Claude Enterprise)は、リセットまでの 1 時間あたりの 5 時間枠の残りで判断するため、ほぼ常に先頭です。キーは magpie が最近送ったトークン数で判断します。",
|
||||
"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.": "モデルの中のグループと、プロバイダーのルーティングがスマート以外のモデルは、独自のルーティングを保ちます。このグループはそれと他のメンバーの間で選ぶだけで、そのグループが最初に試すアカウントやキーで比較し、選ばれたらそのグループ全体を独自の順番で試します。ルーティングをスマートのままにしたモデルの中のグループは、このグループのルーティングに従います。ただし、このグループが順番、重み付け、手動の場合を除きます。",
|
||||
"errors your agent saw": "エージェントが受けたエラー",
|
||||
"It said: {error}": "メッセージ:{error}",
|
||||
@@ -1736,7 +1738,7 @@ magpie.strings({
|
||||
"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.": "交互:各会話の次のターンは前回応答したアカウントの次のアカウントへ、新しい会話はさらにその次から始まります。ターン内のリクエストは同じアカウントのままで、プロンプトキャッシュを保ちます。",
|
||||
"Least used first: the account with the most of its allowance left goes first; a key by the tokens magpie sent it lately.": "使用量が最少:利用枠の残りが最も多いアカウントが先です。キーは magpie が最近送ったトークン数で決まります。",
|
||||
"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.": "週ペース:更新までの 1 時間あたりの週の残りが最も多いアカウントが先です — リセットで失うものが最も多いアカウントです。5 時間枠だけで週の枠がないアカウントは 5 時間枠の 1 時間あたりの残りで決まります。90% 以上使ったアカウントは他が応答できなくなるまで待ち、キーは 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} を処理できる相手がいませんでした。",
|
||||
"{who} is the only one, so it's tried though it is resting.": "{who} しかいないため、休止中ですが試します。",
|
||||
"{who} is the only account on for {model} — nothing to choose between.": "{model} で有効なアカウントは {who} だけです — 選ぶ余地はありません。",
|
||||
@@ -1751,11 +1753,12 @@ magpie.strings({
|
||||
"Least used first: {who} has the most of its allowance left — {n} used.": "使用量が最少:{who} は利用枠の残りが最も多いです — 使用済み {n}。",
|
||||
"Least used first: {who} served the fewest tokens lately — {n}.": "使用量が最少:{who} は最近処理したトークンが最も少ないです — {n}。",
|
||||
"Least used first: {who} goes first.": "使用量が最少:{who} が先です。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "週ペース:{who} はリセットまでの 1 時間あたりの残り利用枠が最も多いです — 残り {n}、{d} 後にリセット。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "週ペース:{who} は、期限切れ間近の Codex リセットが自動で使われるまでの 1 時間あたりの残り利用枠が最も多いです — 残り {n}、{d} 後に使用。",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} used.": "週ペース:{who} はリセットまでの 1 時間あたりの残り利用枠が最も多いです — 使用済み {n}。",
|
||||
"Weekly pace: {who} served the fewest tokens lately — {n}.": "週ペース:{who} は最近処理したトークンが最も少ないです — {n}。",
|
||||
"Weekly pace: {who} goes first.": "週ペース:{who} が先です。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "期限前に使い切る:{who} はリセットまでの 1 時間あたりの残り利用枠が最も多いです — 残り {n}、{d} 後にリセット。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "期限前に使い切る:{who} は、期限切れ間近の Codex リセットが自動で使われるまでの 1 時間あたりの残り利用枠が最も多いです — 残り {n}、{d} 後に使用。",
|
||||
"Use before expiry: {who} has the most credits expiring per hour until they expire — {n} of its allowance expires in {d}.": "期限前に使い切る:{who} は期限切れまでの 1 時間あたりの期限切れ間近のクレジットが最も多いです — 枠の {n} が {d} 後に期限切れ。",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} used.": "期限前に使い切る:{who} はリセットまでの 1 時間あたりの残り利用枠が最も多いです — 使用済み {n}。",
|
||||
"Use before expiry: {who} served the fewest tokens lately — {n}.": "期限前に使い切る:{who} は最近処理したトークンが最も少ないです — {n}。",
|
||||
"Use before expiry: {who} goes first.": "期限前に使い切る:{who} が先です。",
|
||||
"{who} goes first: it's made for {api}, the API {model} is at home in, so nothing is translated.": "{who} が先です:{model} 本来の API である {api} 用なので、変換は不要です。",
|
||||
"{who} goes first: keys go in their order, those that suit the request first.": "{who} が先です:キーは設定順で、リクエストに合うものが先です。",
|
||||
"{who} goes first.": "{who} が先です。",
|
||||
@@ -2323,7 +2326,7 @@ magpie.strings({
|
||||
"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.",
|
||||
"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.",
|
||||
"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.": "Wochentempo: Das Konto mit dem meisten Wochenrest pro Stunde bis zur Erneuerung kommt zuerst, damit beim Zurücksetzen weniger von der Woche jedes Mitglieds 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.",
|
||||
"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“.",
|
||||
"errors your agent saw": "Fehler, die Ihr Agent sah",
|
||||
"It said: {error}": "Meldung: {error}",
|
||||
@@ -2389,7 +2392,7 @@ magpie.strings({
|
||||
"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.",
|
||||
"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.",
|
||||
"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.": "Wochentempo: Das Konto mit dem meisten Wochenrest pro Stunde bis zur Erneuerung kommt zuerst – das, bei dem beim Zurücksetzen am meisten verfällt; 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.",
|
||||
"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.",
|
||||
"{who} is the only one, so it's tried though it is resting.": "{who} ist das einzige und wird daher versucht, obwohl es pausiert.",
|
||||
"{who} is the only account on for {model} — nothing to choose between.": "{who} ist das einzige aktive Konto für {model} – nichts zu wählen.",
|
||||
@@ -2404,11 +2407,12 @@ magpie.strings({
|
||||
"Least used first: {who} has the most of its allowance left — {n} used.": "Am wenigsten genutzt zuerst: {who} hat das größte Restkontingent – {n} verbraucht.",
|
||||
"Least used first: {who} served the fewest tokens lately — {n}.": "Am wenigsten genutzt zuerst: {who} hat zuletzt die wenigsten Token verarbeitet – {n}.",
|
||||
"Least used first: {who} goes first.": "Am wenigsten genutzt zuerst: {who} kommt zuerst.",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "Wochentempo: {who} hat das meiste Restkontingent pro Stunde bis zum Zurücksetzen – {n} übrig, Zurücksetzen in {d}.",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "Wochentempo: {who} hat das meiste Restkontingent pro Stunde, bis einer seiner bald verfallenden Codex-Resets von selbst eingelöst wird – {n} übrig, eingelöst in {d}.",
|
||||
"Weekly pace: {who} has the most remaining allowance per hour until reset — {n} used.": "Wochentempo: {who} hat das meiste Restkontingent pro Stunde bis zum Zurücksetzen – {n} verbraucht.",
|
||||
"Weekly pace: {who} served the fewest tokens lately — {n}.": "Wochentempo: {who} hat zuletzt die wenigsten Token verarbeitet – {n}.",
|
||||
"Weekly pace: {who} goes first.": "Wochentempo: {who} kommt zuerst.",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} left, resets in {d}.": "Vor Ablauf aufbrauchen: {who} hat das meiste Restkontingent pro Stunde bis zum Zurücksetzen – {n} übrig, Zurücksetzen in {d}.",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until one of its Codex resets about to run out is used by itself — {n} left, used in {d}.": "Vor Ablauf aufbrauchen: {who} hat das meiste Restkontingent pro Stunde, bis einer seiner bald verfallenden Codex-Resets von selbst eingelöst wird – {n} übrig, eingelöst in {d}.",
|
||||
"Use before expiry: {who} has the most credits expiring per hour until they expire — {n} of its allowance expires in {d}.": "Vor Ablauf aufbrauchen: {who} hat pro Stunde bis zum Ablauf das meiste ablaufende Guthaben – {n} seines Kontingents läuft in {d} ab.",
|
||||
"Use before expiry: {who} has the most remaining allowance per hour until reset — {n} used.": "Vor Ablauf aufbrauchen: {who} hat das meiste Restkontingent pro Stunde bis zum Zurücksetzen – {n} verbraucht.",
|
||||
"Use before expiry: {who} served the fewest tokens lately — {n}.": "Vor Ablauf aufbrauchen: {who} hat zuletzt die wenigsten Token verarbeitet – {n}.",
|
||||
"Use before expiry: {who} goes first.": "Vor Ablauf aufbrauchen: {who} kommt zuerst.",
|
||||
"{who} goes first: it's made for {api}, the API {model} is at home in, so nothing is translated.": "{who} kommt zuerst: Es ist für {api} gedacht, die native API von {model}, daher wird nichts übersetzt.",
|
||||
"{who} goes first: keys go in their order, those that suit the request first.": "{who} kommt zuerst: Schlüssel gehen in ihrer Reihenfolge, die zur Anfrage passenden zuerst.",
|
||||
"{who} goes first.": "{who} kommt zuerst.",
|
||||
|
||||
@@ -26,7 +26,7 @@ const PLUGINS = [
|
||||
{ id: "middleware", name: "JS gateway plugins", sub: "Run the JavaScript gateway plugins: middleware on agents' requests and replies, routings and usage observers", one: "1 gateway plugin on", many: "{n} gateway plugins on" },
|
||||
{ id: "otel", name: "Observability", sub: "Send each request's traces and metrics to an OpenTelemetry collector, such as Langfuse", one: "Sending to a collector", many: "Sending to a collector" },
|
||||
{ id: "redact", name: "Privacy masking", sub: "Secrets, personal data and your own words go to vendors as placeholders, and come back as they were", one: "Masking is on", many: "Masking is on" },
|
||||
{ id: "rotation", name: "Routing strategies", sub: "The routings besides Smart: In order, Until used up, In turn, Least used first, Weekly pace, By weight, Free first, Speed first and Cheapest first", one: "1 provider or group routed so", many: "{n} providers and groups routed so" },
|
||||
{ id: "rotation", name: "Routing strategies", sub: "The routings besides Smart: In order, Until used up, In turn, Least used first, Use before expiry, By weight, Free first, Speed first and Cheapest first", one: "1 provider or group routed so", many: "{n} providers and groups routed so" },
|
||||
{ id: "routing", name: "Routing", sub: "Each request as the gateway routes it, the accounts it weighed and what each answered, and your routing groups", one: "1 group in use", many: "{n} groups in use" },
|
||||
{ id: "search", name: "Web search", sub: "Models that can't search the web search with a provider that can, or a search API", one: "1 search source set up", many: "{n} search sources set up" },
|
||||
{ id: "sessions", name: "Sessions", sub: "Your agents' past conversations: read, search, resume and export them", one: "Recording gateway conversations", many: "Recording gateway conversations" },
|
||||
|
||||
@@ -26,7 +26,7 @@ const base = { members: ["a/sol", "b/flash", "c/luna"], ready: true, memberInfo:
|
||||
|
||||
const words = {
|
||||
en: { order: "In order", manual: "Manual", weight: "By weight", smart: "Smart", head: "Routing", edit: "Edit",
|
||||
names: ["Smart", "In order", "Until used up", "In turn", "Least used", "Weekly pace", "Free first", "Speed first", "Cheapest first", "By weight", "Manual"],
|
||||
names: ["Smart", "In order", "Until used up", "In turn", "Least used", "Use before expiry", "Free first", "Speed first", "Cheapest first", "By weight", "Manual"],
|
||||
tip: "How Auto routes: click to change it", saved: "Auto: Manual" },
|
||||
zh: { order: "按顺序", manual: "手动", weight: "按权重", smart: "智能", head: "路由", edit: "编辑",
|
||||
tip: "Auto 的路由方式:点击更改", saved: "Auto:手动" },
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
// Run with Node's test runner and Playwright on the module path; see README.md.
|
||||
// Use before expiry (pace): a WorkBuddy account whose check-in credits
|
||||
// expire before its month renews goes first, and the Routing page's story
|
||||
// says the credits' expiry set its deadline, not its reset (lcyksp on
|
||||
// Discord). An account whose month decides is told as before. In every
|
||||
// language, wide and narrow.
|
||||
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(__dirname, "../assets");
|
||||
const now = new Date();
|
||||
const ago = (minutes) => new Date(now.getTime() - minutes * 60e3).toISOString();
|
||||
const ahead = (hours) => new Date(now.getTime() + hours * 36e5).toISOString();
|
||||
const base = { provider: "workbuddy", name: "WorkBuddy", kind: "account", agent: "workbuddy", model: "deepseek-v4.1-flash", known: true };
|
||||
// A: its month untouched, renewing in 28 days, 70.85 of its 500 credits
|
||||
// expiring in 14 hours: 14% lost then, 1% an hour
|
||||
const a = (fields) => ({ ...base, id: "workbuddy#a", who: "a@example.com", routing: "pace", used: 0, renews: [ahead(672)], ...fields });
|
||||
const b = () => ({ ...base, id: "workbuddy#b", who: "b@example.com", routing: "pace", used: 50, renews: [ahead(240)], pace: 50 / 240, due: ahead(240) });
|
||||
const route = (id, order) => ({
|
||||
id, seq: id, time: ago(1), agent: "workbuddy", model: "deepseek-v4.1-flash", provider: "workbuddy", done: true, status: 200, ms: 900, tokens: 1200,
|
||||
order, tries: [{ id: order[0].id, model: "deepseek-v4.1-flash", start: ago(1), done: true, status: 200, ms: 900 }],
|
||||
});
|
||||
const routes = [
|
||||
route(2, [a({ pace: 70.85 / 500 * 100 / 14, due: ahead(14), dueBy: "expiry", lapse: ahead(14) }), b()]),
|
||||
route(1, [b(), a({ pace: 100 / 672, due: ahead(672) })]),
|
||||
];
|
||||
|
||||
function serve(lang) {
|
||||
return async (request) => {
|
||||
const url = new URL(request.request().url());
|
||||
const json = (data) => request.fulfill({ json: data });
|
||||
if (url.pathname === "/boot.js") return request.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = {lang:"${lang}",theme:"light",web:true};` });
|
||||
if (url.pathname === "/wails/runtime.js") return request.fulfill({ contentType: "text/javascript", body: "export const Window = {};" });
|
||||
if (url.pathname === "/api/state") return json({ agents: [{ id: "workbuddy", name: "WorkBuddy", path: "/test/config.toml", fields: [] }], profiles: [], settings: { lang, theme: "light" } });
|
||||
if (url.pathname === "/api/gateway/trace") {
|
||||
if (url.searchParams.get("wait")) return new Promise(() => {}); // nothing more comes
|
||||
return json({ mine: true, now: now.toISOString(), seq: 4, totals: { requests: routes.length }, 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: [], excluded: [], gateway: { running: true, window: true } });
|
||||
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)];
|
||||
await request.fulfill({ body: await fs.readFile(file), contentType });
|
||||
};
|
||||
}
|
||||
|
||||
// expiry: the credits that expire, 14% of A's month, in 14 hours; week:
|
||||
// the reason an account whose reset decides is told by
|
||||
const words = {
|
||||
en: { expiry: /most credits expiring per hour until they expire — 14\s?% of its allowance expires in/, week: /per hour until reset/ },
|
||||
zh: { expiry: /快过期的积分 ÷ 距过期小时数最高,额度的 14\s?% 将在/, week: /÷ 距重置小时数最高/ },
|
||||
"zh-TW": { expiry: /快過期的點數 ÷ 距過期小時數最高,額度的 14\s?% 將在/, week: /÷ 距重置小時數最高/ },
|
||||
ja: { expiry: /期限切れ間近のクレジットが最も多いです — 枠の 14\s?% が/, week: /リセットまでの 1 時間あたりの残り利用枠/ },
|
||||
de: { expiry: /das meiste ablaufende Guthaben – 14\s?% seines Kontingents läuft in/, week: /Restkontingent pro Stunde bis zum Zurücksetzen/ },
|
||||
};
|
||||
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
for (const lang of Object.keys(words)) {
|
||||
for (const width of [1100, 420]) {
|
||||
test(`${engine} ${lang} ${width}px: credits expiring before the month renews are told as the deadline`, async (t) => {
|
||||
const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));
|
||||
t.after(() => browser.close());
|
||||
const page = await browser.newPage({ viewport: { width, height: 1200 }, reducedMotion: "reduce" });
|
||||
page.setDefaultTimeout(5000);
|
||||
page.setDefaultNavigationTimeout(60000);
|
||||
const errors = [];
|
||||
page.on("pageerror", (error) => errors.push(error.message));
|
||||
await page.route("**/*", serve(lang));
|
||||
await page.goto("http://magpie.test/?view=routing");
|
||||
await page.locator(".rt-req").nth(routes.length - 1).waitFor();
|
||||
const w = words[lang];
|
||||
const why = () => page.locator(".rt-steps li.why").first().textContent();
|
||||
const open = async (n, who, want) => {
|
||||
await page.locator(".rt-req").nth(n).click();
|
||||
await page.waitForFunction(([who, src]) => {
|
||||
const li = document.querySelector(".rt-steps li.why");
|
||||
return li && li.textContent.includes(who) && new RegExp(src).test(li.textContent);
|
||||
}, [who, want.source]);
|
||||
};
|
||||
await open(0, "a@example.com", w.expiry);
|
||||
assert.doesNotMatch(await why(), w.week);
|
||||
// the month decides: as before
|
||||
await open(1, "b@example.com", w.week);
|
||||
assert.doesNotMatch(await why(), w.expiry);
|
||||
const wide = await page.evaluate(() => document.documentElement.scrollWidth - window.innerWidth);
|
||||
assert.ok(wide <= 0, `the page scrolls sideways by ${wide}px`);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// Run with Node's test runner and Playwright on the module path; see README.md.
|
||||
// #717, #718: a Codex account that spends a reset about to run out by
|
||||
// itself goes first, in Weekly pace and Smart, when that reset is spent
|
||||
// itself goes first, in Use before expiry and Smart, when that reset is spent
|
||||
// before its week renews — and the Routing page's story says the reset
|
||||
// set its deadline, not its week. An account whose week decides is told
|
||||
// as before. In English and Chinese.
|
||||
|
||||
@@ -56,7 +56,7 @@ function serve(lang, posts, off = []) {
|
||||
|
||||
const ROUTINGS = [
|
||||
["", "Smart", "智能"], ["order", "In order", "按顺序"], ["drain", "Until used up", "用完再换"], ["rotate", "In turn", "轮流"],
|
||||
["usage", "Least used first", "用量少的优先"], ["pace", "Weekly pace", "重置前用完"],
|
||||
["usage", "Least used first", "用量少的优先"], ["pace", "Use before expiry", "到期前用完"],
|
||||
];
|
||||
const STAYS = [["", "Auto", "自动"], ["session", "Session", "整个会话"], ["turn", "Within a turn", "一轮之内"], ["off", "Off", "关闭"]];
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// says what it has left, "750 积分 left", with no bar (a share it was
|
||||
// never told), in the live rows and in the accounts listed below; the
|
||||
// story says the first went first as its wallet has the most left,
|
||||
// naming both figures, under Smart, Least used and Weekly pace alike.
|
||||
// naming both figures, under Smart, Least used and Use before expiry alike.
|
||||
// Where it said "0% used" and "in the order given". Every language, at a
|
||||
// window's width and at 420px, in both engines.
|
||||
const assert = require("node:assert/strict");
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
// An account that spends a Codex reset about to run out by itself has its
|
||||
// windows started again then, resetLead before the reset runs out:
|
||||
// Weekly pace goes by the hours until that, when it is sooner than the week
|
||||
// Use before expiry goes by the hours until that, when it is sooner than the week
|
||||
// renews, and Smart's renewals do too (#717, #718). A reset that runs out
|
||||
// after the week renews, or has run out, changes nothing.
|
||||
func TestPaceUntilAutoUsedReset(t *testing.T) {
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"math"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Pace takes credits expiring before a budget window renews for its
|
||||
// deadline when they make the more per hour (lcyksp on Discord): the share
|
||||
// that expires (RunsOutLeft of Of, at most all), else all that is left,
|
||||
// per hour until they expire, never fewer than one.
|
||||
func TestPaceCreditsExpiring(t *testing.T) {
|
||||
now := time.Now()
|
||||
month := now.Add(28 * 24 * time.Hour)
|
||||
l := Limit{Used: 20, Of: 500, Resets: month}
|
||||
near := func(got, want float64) bool { return math.Abs(got-want) < 1e-9 }
|
||||
|
||||
if got, due := (Allowance{l}).Pace("m", now); !near(got, 80/(28*24.0)) || !due.Equal(month) {
|
||||
t.Fatalf("nothing expiring: %v by %v", got, due)
|
||||
}
|
||||
l.RunsOut, l.RunsOutLeft = now.Add(10*time.Hour), 50 // 10% in 10h
|
||||
if got, due := (Allowance{l}).Pace("m", now); !near(got, 1) || !due.Equal(l.RunsOut) {
|
||||
t.Fatalf("expiring: %v by %v", got, due)
|
||||
}
|
||||
l.RunsOutLeft = 0 // not told: the 80% left
|
||||
if got, _ := (Allowance{l}).Pace("m", now); !near(got, 8) {
|
||||
t.Fatalf("amount not told: %v", got)
|
||||
}
|
||||
l.RunsOutLeft = 5000 // more than the window: all of it
|
||||
if got, _ := (Allowance{l}).Pace("m", now); !near(got, 10) {
|
||||
t.Fatalf("capped: %v", got)
|
||||
}
|
||||
l.RunsOut, l.RunsOutLeft = now.Add(10*time.Minute), 50 // an hour at least
|
||||
if got, _ := (Allowance{l}).Pace("m", now); !near(got, 10) {
|
||||
t.Fatalf("within the hour: %v", got)
|
||||
}
|
||||
l.RunsOut, l.RunsOutLeft = now.Add(14*time.Hour), 0.5 // too little to matter
|
||||
if got, due := (Allowance{l}).Pace("m", now); !near(got, 80/(28*24.0)) || !due.Equal(month) {
|
||||
t.Fatalf("a little expiring: %v by %v", got, due)
|
||||
}
|
||||
l.RunsOut = month.Add(time.Hour) // after the renewal
|
||||
if got, due := (Allowance{l}).Pace("m", now); !near(got, 80/(28*24.0)) || !due.Equal(month) {
|
||||
t.Fatalf("after the renewal: %v by %v", got, due)
|
||||
}
|
||||
}
|
||||
|
||||
// allowanceOf carries how much expires with when (QuotaWindow.RunsOut).
|
||||
func TestAllowanceCarriesRunsOutLeft(t *testing.T) {
|
||||
at := time.Now().Add(14 * time.Hour)
|
||||
a := allowanceOf([]QuotaWindow{{Name: "Credits", Used: 0, Limit: 500, RunsOutAt: &at, RunsOut: 70.85}}, time.Now())
|
||||
if len(a) != 1 || !a[0].RunsOut.Equal(at) || a[0].RunsOutLeft != 70.85 {
|
||||
t.Fatalf("allowance %+v", a)
|
||||
}
|
||||
}
|
||||
@@ -258,6 +258,9 @@ type Limit struct {
|
||||
// RunsOut is when the soonest of what the window has left is lost,
|
||||
// apart from its reset (QuotaWindow.RunsOutAt): zero when not known.
|
||||
RunsOut time.Time
|
||||
// RunsOutLeft is how much, in Unit, is lost at RunsOut
|
||||
// (QuotaWindow.RunsOut): zero when not told
|
||||
RunsOutLeft float64
|
||||
// Credits: the account goes on past this window on its credits
|
||||
// (QuotaWindow.Credits)
|
||||
Credits bool
|
||||
@@ -295,7 +298,7 @@ func (a Allowance) WeekUsedUp(now time.Time) bool {
|
||||
// as the Codex reset about to run out is spent (expiringResetSpent):
|
||||
// resetLead before it runs out, or now when the account is held up
|
||||
// past then. What they have left then is lost, as at their own reset, so
|
||||
// Weekly pace and Smart take it for their renewal when it comes sooner
|
||||
// Use before expiry and Smart take it for their renewal when it comes sooner
|
||||
// (#717, #718). Zero when none will be.
|
||||
func (a Allowance) Restarts(now time.Time) time.Time {
|
||||
for _, l := range a {
|
||||
@@ -563,7 +566,14 @@ const FreshPace = 100 / (7 * 24.0)
|
||||
// go by what they have used, among the rest as the fresh are. An
|
||||
// account whose windows an auto-used reset starts again sooner than they
|
||||
// renew (Restarts) goes by that instead, and due is then that time: what
|
||||
// it has left is lost there.
|
||||
// it has left is lost there. Credits in a budget window that expire
|
||||
// before it renews (Limit.RunsOut) are lost sooner still: the window goes
|
||||
// by those that expire first, per hour until they do, when that is the
|
||||
// more — what expires as a share of the window (RunsOutLeft of Of), or
|
||||
// all it has left when the amount isn't told, as Renewal takes it. A
|
||||
// WorkBuddy account whose check-in credits expire tomorrow goes ahead of
|
||||
// one whose month has more left but nothing expiring (lcyksp on
|
||||
// Discord); due is then the expiry.
|
||||
func (a Allowance) Pace(model string, now time.Time) (pace float64, due time.Time) {
|
||||
model = strings.ToLower(model)
|
||||
restart := a.Restarts(now)
|
||||
@@ -606,7 +616,11 @@ func (a Allowance) Pace(model string, now time.Time) (pace float64, due time.Tim
|
||||
until, renews = l.Resets.Sub(now), l.Resets
|
||||
}
|
||||
until, renews = cut(until, renews)
|
||||
if p := (100 - u) / max(until, time.Hour).Hours(); !any || p < pace {
|
||||
p := (100 - u) / max(until, time.Hour).Hours()
|
||||
if q, at, ok := l.expiring(u, now, now.Add(until)); ok && q > p {
|
||||
p, renews = q, at
|
||||
}
|
||||
if !any || p < pace {
|
||||
pace, due, any = p, renews, true
|
||||
}
|
||||
}
|
||||
@@ -619,6 +633,21 @@ func (a Allowance) Pace(model string, now time.Time) (pace float64, due time.Tim
|
||||
return pace, due
|
||||
}
|
||||
|
||||
// expiring is the pace of what a window loses at RunsOut, when that
|
||||
// comes after now and before ends, the window's renewal: the share that
|
||||
// expires (RunsOutLeft of Of, at most all), else all it has left (100-u),
|
||||
// per hour until then, never fewer than one.
|
||||
func (l Limit) expiring(u float64, now, ends time.Time) (pace float64, at time.Time, ok bool) {
|
||||
if !l.RunsOut.After(now) || !l.RunsOut.Before(ends) {
|
||||
return 0, time.Time{}, false
|
||||
}
|
||||
share := 100 - u
|
||||
if l.RunsOutLeft > 0 && l.Of > 0 {
|
||||
share = min(100, 100*l.RunsOutLeft/l.Of)
|
||||
}
|
||||
return share / max(l.RunsOut.Sub(now), time.Hour).Hours(), l.RunsOut, true
|
||||
}
|
||||
|
||||
// Allowances is each of an agent's accounts' allowance by user, as last
|
||||
// known, asked for again in the background when that was over a minute
|
||||
// ago. Only the very first ask waits, and not for long. An account
|
||||
@@ -996,7 +1025,7 @@ func allowanceOf(ws []QuotaWindow, now time.Time) Allowance {
|
||||
l.Resets = now.Add(time.Duration(w.ResetSecs) * time.Second)
|
||||
}
|
||||
if w.RunsOutAt != nil {
|
||||
l.RunsOut = *w.RunsOutAt
|
||||
l.RunsOut, l.RunsOutLeft = *w.RunsOutAt, w.RunsOut
|
||||
}
|
||||
if w.Balance != nil {
|
||||
// a wallet is known by its balance, with no share invented:
|
||||
|
||||
@@ -165,7 +165,7 @@ func TestLeastUsedSeatsWithNoShare(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Weekly pace: the most of a week left per hour first; one running low
|
||||
// Use before expiry: the most of a week left per hour first; one running low
|
||||
// after, whatever its pace.
|
||||
func TestPace(t *testing.T) {
|
||||
s := []Seat{{Key: "slow", Pace: 1}, {Key: "low", Used: 95, Pace: 50}, {Key: "fast", Pace: 10}}
|
||||
@@ -195,7 +195,7 @@ func TestWeighted(t *testing.T) {
|
||||
|
||||
// Of those all but used up, one that goes on on its credits (a Codex
|
||||
// account holding them) goes before those with nothing left, though it
|
||||
// has used more, in Smart, Weekly pace and Least used alike; still after
|
||||
// has used more, in Smart, Use before expiry and Least used alike; still after
|
||||
// every one with room or running low, its allowance spent before its
|
||||
// credits are.
|
||||
func TestCreditsFirstOfTheSpent(t *testing.T) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package rotation is the routings a provider or group can be set to
|
||||
// besides Smart: In order, Until used up, In turn, Least used first,
|
||||
// Weekly pace, By weight, Free first, Speed first and Cheapest first (a
|
||||
// Use before expiry, By weight, Free first, Speed first and Cheapest first (a
|
||||
// group's). While a provider or group is routed by one, it
|
||||
// stays on.
|
||||
//
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
func init() {
|
||||
pluginrt.Register(pluginrt.Manifest{
|
||||
ID: "rotation", API: "^1", Requires: []string{"providers", "gateway"}, Essential: true,
|
||||
Name: "Routing strategies", Sub: "The routings besides Smart: In order, Until used up, In turn, Least used first, Weekly pace, By weight, Free first, Speed first and Cheapest first",
|
||||
Name: "Routing strategies", Sub: "The routings besides Smart: In order, Until used up, In turn, Least used first, Use before expiry, By weight, Free first, Speed first and Cheapest first",
|
||||
One: "1 provider or group routed so", Many: "{n} providers and groups routed so",
|
||||
InUse: inUse,
|
||||
Parts: []pluginrt.Part{{Slot: "part", Key: "rotation"}},
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
</figure>
|
||||
|
||||
<h3>1 つのプロバイダに複数のアカウントやキー</h3>
|
||||
<p>プロバイダの行を開き、使うアカウントやキーをすべてチェックします。<span class="ui">Routing</span> はリクエストをそれらにどう振り分けるかを決めます:<span class="ui">Smart</span>(デフォルト)、<span class="ui">In order</span>、<span class="ui">Until used up</span>(使い切ったら次へ移り、前のものが回復しても戻りません)、<span class="ui">In turn</span>、<span class="ui">Least used first</span>、<span class="ui">Weekly pace</span>、<span class="ui">By weight</span>(各アカウントやキーが横で設定した重みで取り分を受けます。たとえば Max アカウントは 5、Pro は 1)、<span class="ui">Speed first</span>(最近いちばん速く応答したキーが先)。<span class="ui">Fallback</span> には、プロバイダのクォータ切れ、レート制限、ダウン時に代わりに使うモデルを並べます。</p>
|
||||
<p>プロバイダの行を開き、使うアカウントやキーをすべてチェックします。<span class="ui">Routing</span> はリクエストをそれらにどう振り分けるかを決めます:<span class="ui">Smart</span>(デフォルト)、<span class="ui">In order</span>、<span class="ui">Until used up</span>(使い切ったら次へ移り、前のものが回復しても戻りません)、<span class="ui">In turn</span>、<span class="ui">Least used first</span>、<span class="ui">Use before expiry</span>、<span class="ui">By weight</span>(各アカウントやキーが横で設定した重みで取り分を受けます。たとえば Max アカウントは 5、Pro は 1)、<span class="ui">Speed first</span>(最近いちばん速く応答したキーが先)。<span class="ui">Fallback</span> には、プロバイダのクォータ切れ、レート制限、ダウン時に代わりに使うモデルを並べます。</p>
|
||||
|
||||
<h3>1 つのモデルを複数のプロバイダで</h3>
|
||||
<p>グループとは、1 つまたは複数のプロバイダのモデルを、エージェントが 1 つとして選べるようにまとめたものです。ピッカーの <em>Routing groups</em> の下に <code>group/<id></code> として表示されます。2 つのプロバイダが同じ名前で提供しているモデルは、それだけでグループになります。<span class="ui">Routing</span> タブの <span class="ui">New group</span> では、好きなモデルを組み合わせてグループを作れます。グループで何ができるかは、最初のモデルが基準になります。</p>
|
||||
@@ -184,7 +184,7 @@
|
||||
<tr><td>使い切ってから次へ <code>drain</code></td><td>1 つのアカウントやキーを使い切るまで使い、その後は次へ移ってそのまま使い続けます。その間に前のものが回復しても戻りません。レート制限やエラーのものは休止中だけ飛ばします。</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 時間枠の残りで判断されるので、ほぼ常に最初になります。使用率が 90% 以上のものは、他が応答できなくなるまで待ちます。キーは最近送ったトークン数で判断します。</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>
|
||||
<tr><td>速度優先 <code>fast</code></td><td>このモデルに最近いちばん速く応答したメンバー、アカウント、キーが先です。最初のトークンまでの時間と出力の速さで比べ、新しい応答ほど重く数えます。差が 1 割以内のものは並び順のままです。1 時間測っていないものには 5 件に 1 件を回すので、一度遅かったチャネルもまた試されます。失敗して休んでいるものは最後です。測るのはストリーミングの応答だけで、再起動すると測り直します。</td></tr>
|
||||
<tr><td>最安優先 <code>cheap</code></td><td>ルーティンググループのみ。いまモデルが最も安いメンバーが先です。Usage が数えるのと同じく、この時間帯の入力・出力 100 万トークンあたりの価格で比べます:自分で設定した価格、なければ定価に、プロバイダの価格倍率と時間帯倍率をかけたもの。DeepSeek 公式 API、Command Code と OpenCode Go の DeepSeek モデルはピーク時間帯(平日 UTC 01:00–04:00 と 06:00–10:00)に、Ollama Cloud の DeepSeek V4.1 Flash と V4 Pro は自社のピーク時間帯(平日 UTC 12:00–18:00、それ以外は半額)に 2 倍になるので、2 つのプロバイダにある同じ DeepSeek モデルはその時間に安い方へ送られます。同じ価格のものは順番どおり、価格が分からないものは最後です。</td></tr>
|
||||
@@ -192,7 +192,7 @@
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>維持</th><th>会話が、応答したアカウントやキーに留まる期間</th></tr>
|
||||
<tr><td>自動 <code>auto</code></td><td>デフォルトです。ターン内では常に、ターンをまたいでは、ベンダーがキャッシュした内容が保持する価値のある間。</td></tr>
|
||||
<tr><td>セッション <code>session</code></td><td>応答できる限り、セッション全体。ルーティングがスマート、使用量の少ない順、週のペースのとき、新しいセッションは他のセッションが最も少ないアカウントやキーに割り当てられ、同時に開いたセッションはそれぞれ別のものを使います。</td></tr>
|
||||
<tr><td>セッション <code>session</code></td><td>応答できる限り、セッション全体。ルーティングがスマート、使用量の少ない順、「期限前に使い切る」のとき、新しいセッションは他のセッションが最も少ないアカウントやキーに割り当てられ、同時に開いたセッションはそれぞれ別のものを使います。</td></tr>
|
||||
<tr><td>ターン内 <code>turn</code></td><td>エージェントがツールの結果を返している間。あなたが再び発言すると、ルーティングが改めて決めます。</td></tr>
|
||||
<tr><td>オフ <code>off</code></td><td>リクエストごとに改めてルーティングします。</td></tr>
|
||||
<tr><td>厳格 <code>strict</code></td><td>使用量上限を超えても、他のアカウントやキーへは移りません。レート制限や割り当て切れのときは、エラーがそのままエージェントに渡ります。新しい会話は「セッション」と同じく分散されます。</td></tr>
|
||||
@@ -214,8 +214,8 @@
|
||||
<p>グループのモデルには別のグループも含められます。<span class="ui">Add a model</span> の <em>Routing groups</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> 外側のグループのルーティングが何であれ、内側のグループの中には及びません。スマート、持ち回り、使用量の少ない順、週のペースは、内側のグループを 1 つのメンバーとして、内側のグループが最初に試すアカウントやキーで評価します。そこが選ばれると、内側のグループが丸ごと、自分の順序で試されます。Claude(順番どおり)と GPT(順番どおり)を含むスマートの Coder は、両者のアカウントをすべてまとめて比べるのではなく、Claude の先頭と GPT の先頭を比べます。</li>
|
||||
<li><b>独自のルーティングを持つプロバイダーも同じです。</b> プロバイダーのアカウントやキーのルーティングを順番どおり、持ち回り、使用量の少ない順、週のペース、重みにしたモデルは、どのグループの中でもそれを保ちます。グループはそれが最初に試すアカウントやキーで比べ、選ばれたら自分の順序で丸ごと試します。既定のスマートのままのプロバイダーは、アカウントがグループの他のものとまとめて比べられ、どのプロバイダーのものでも枠が最も早くリセットされるものが先になります。</li>
|
||||
<li><b>各グループは自分のルーティングに従います。</b> 外側のグループのルーティングが何であれ、内側のグループの中には及びません。スマート、持ち回り、使用量の少ない順、期限前に使い切るは、内側のグループを 1 つのメンバーとして、内側のグループが最初に試すアカウントやキーで評価します。そこが選ばれると、内側のグループが丸ごと、自分の順序で試されます。Claude(順番どおり)と GPT(順番どおり)を含むスマートの Coder は、両者のアカウントをすべてまとめて比べるのではなく、Claude の先頭と GPT の先頭を比べます。</li>
|
||||
<li><b>独自のルーティングを持つプロバイダーも同じです。</b> プロバイダーのアカウントやキーのルーティングを順番どおり、持ち回り、使用量の少ない順、期限前に使い切る、重みにしたモデルは、どのグループの中でもそれを保ちます。グループはそれが最初に試すアカウントやキーで比べ、選ばれたら自分の順序で丸ごと試します。既定のスマートのままのプロバイダーは、アカウントがグループの他のものとまとめて比べられ、どのプロバイダーのものでも枠が最も早くリセットされるものが先になります。</li>
|
||||
<li><b>フェイルオーバーは通ります。</b> 内側のグループのモデルがすべて失敗すると、他のメンバーと同様に、外側のグループの次のメンバーが応答します。</li>
|
||||
<li>2 回現れるモデル(単独と、中のグループ内)は、最初の位置で一度だけ問い合わせます。</li>
|
||||
</ul>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
</figure>
|
||||
|
||||
<h3>Several accounts or keys in one provider</h3>
|
||||
<p>Open the provider’s row and tick every account or key to use. <span class="ui">Routing</span> says how requests spread over them: <span class="ui">Smart</span> (the default), <span class="ui">In order</span>, <span class="ui">Until used up</span>, staying on the next once one is used up even after the first renews, <span class="ui">In turn</span>, <span class="ui">Least used first</span>, <span class="ui">Weekly pace</span>, <span class="ui">By weight</span>, each account or key taking its share by the weight set beside it (a Max account 5, a Pro one 1), or <span class="ui">Speed first</span>, the key that answered fastest lately first. <span class="ui">Fallback</span> lists models to use instead when the provider is out of quota, rate limited or down.</p>
|
||||
<p>Open the provider’s row and tick every account or key to use. <span class="ui">Routing</span> says how requests spread over them: <span class="ui">Smart</span> (the default), <span class="ui">In order</span>, <span class="ui">Until used up</span>, staying on the next once one is used up even after the first renews, <span class="ui">In turn</span>, <span class="ui">Least used first</span>, <span class="ui">Use before expiry</span>, <span class="ui">By weight</span>, each account or key taking its share by the weight set beside it (a Max account 5, a Pro one 1), or <span class="ui">Speed first</span>, the key that answered fastest lately first. <span class="ui">Fallback</span> lists models to use instead when the provider is out of quota, rate limited or down.</p>
|
||||
|
||||
<h3>One model over several providers</h3>
|
||||
<p>A group is several models, from one provider or many, that an agent picks as one: <code>group/<id></code>, under <em>Routing groups</em> in the picker. A model two of your providers serve under the same name becomes a group on its own; <span class="ui">New group</span> in the <span class="ui">Routing</span> tab makes one of any models you like. The first model answers for what the group can do.</p>
|
||||
@@ -184,7 +184,7 @@
|
||||
<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>Least used <code>usage</code></td><td>The account or key with the most of its allowance left.</td></tr>
|
||||
<tr><td>Weekly pace <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. One at 90% or more waits until the others can’t answer. A key by the tokens sent it lately.</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>
|
||||
<tr><td>Speed first <code>fast</code></td><td>The member, account or key that answered this model fastest lately: the time to its first token and how fast it writes, newer answers counting more. Those within a tenth of each other keep their order. One not measured in the last hour gets one request in five, so a channel that was slow once is tried again; one resting after a failure goes last. Only streamed replies are measured, and a restart measures again from scratch.</td></tr>
|
||||
<tr><td>Cheapest first <code>cheap</code></td><td>Groups only. The member whose model costs least now, by its price a million tokens in and out at this hour as Usage counts it: your own price for it, else its list price, at the provider’s price rate and rate windows. DeepSeek’s own API, Command Code’s and OpenCode Go’s DeepSeek models cost double in their peak hours (weekdays 01:00–04:00 and 06:00–10:00 UTC), and Ollama Cloud’s DeepSeek V4.1 Flash and V4 Pro in its own (weekdays 12:00–18:00 UTC, half price the rest of the time), so a DeepSeek model listed on two providers goes to the one cheaper at that hour. Members that cost the same keep their order; one with no known price goes last.</td></tr>
|
||||
@@ -192,7 +192,7 @@
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>Stays</th><th>How long a conversation stays with the account or key that answered it</th></tr>
|
||||
<tr><td>Auto <code>auto</code></td><td>The default. Within a turn always, across turns while what the vendor cached of it is worth keeping.</td></tr>
|
||||
<tr><td>Session <code>session</code></td><td>The whole session, while it can answer. With Smart, Least used first or Weekly pace, a new session goes to the account or key the fewest other sessions are on, so sessions side by side each keep one of their own.</td></tr>
|
||||
<tr><td>Session <code>session</code></td><td>The whole session, while it can answer. With Smart, Least used first or Use before expiry, a new session goes to the account or key the fewest other sessions are on, so sessions side by side each keep one of their own.</td></tr>
|
||||
<tr><td>Within a turn <code>turn</code></td><td>While the agent sends tool results back; when you speak again, routing decides afresh.</td></tr>
|
||||
<tr><td>Off <code>off</code></td><td>Every request is routed afresh.</td></tr>
|
||||
<tr><td>Strict <code>strict</code></td><td>Never moves to another account or key, even past its usage cap: when that one is rate limited or out of quota, the error goes to the agent. New conversations are spread as with Session.</td></tr>
|
||||
@@ -214,8 +214,8 @@
|
||||
<p>A group’s models can include another group: pick it under <em>Routing groups</em> in <span class="ui">Add a model</span>, or <code>models+=group/<id></code> from a terminal. The group in it takes its place in the order and routes among its own models by its own routing and rules. So Coder can be <code>deepseek-v4-pro</code> then <em>Fast</em>, and Fast its own order of cheap models. A Coder rule can send a turn to <code>group/fast</code>, and Fast’s own rules then pick which of its models goes first.</p>
|
||||
<ul>
|
||||
<li><b>No loops.</b> A group can’t be in itself, directly or through the groups in it. Saving Fast with Coder in it, while Coder has Fast, is refused, and the picker doesn’t offer such a group. Groups go at most 8 deep. A group can’t be removed while another has it: take it out there first.</li>
|
||||
<li><b>Each group routes by its own routing.</b> Whatever the outer group’s routing, it never reaches inside a group in it: Smart, In turn, Least used or Weekly pace weighs the inner group as one member, by the account or key the inner group would try first, and where it lands the inner group is tried whole, in its own order. Coder on Smart with Claude (In order) and GPT (In order) in it compares Claude’s first with GPT’s first, not all of their accounts together.</li>
|
||||
<li><b>So does a provider routed its own way.</b> A model whose provider routes its accounts or keys In order, In turn, by Least used, Weekly pace or Weight keeps that inside any group, weighed as one by the account or key it would try first and tried whole in its own order. One left on Smart, the default, has its accounts weighed with the group’s others as one pool, so the one whose allowance renews soonest goes first whichever provider it is of.</li>
|
||||
<li><b>Each group routes by its own routing.</b> Whatever the outer group’s routing, it never reaches inside a group in it: Smart, In turn, Least used or Use before expiry weighs the inner group as one member, by the account or key the inner group would try first, and where it lands the inner group is tried whole, in its own order. Coder on Smart with Claude (In order) and GPT (In order) in it compares Claude’s first with GPT’s first, not all of their accounts together.</li>
|
||||
<li><b>So does a provider routed its own way.</b> A model whose provider routes its accounts or keys In order, In turn, by Least used, Use before expiry or Weight keeps that inside any group, weighed as one by the account or key it would try first and tried whole in its own order. One left on Smart, the default, has its accounts weighed with the group’s others as one pool, so the one whose allowance renews soonest goes first whichever provider it is of.</li>
|
||||
<li><b>Failover goes through.</b> If every model in the inner group fails, the outer group’s next member answers, as with any member.</li>
|
||||
<li>A model that appears twice (on its own and in a group in it) is asked once, at its first place.</li>
|
||||
</ul>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
</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>、<span class="ui">按权重</span>(每个账号或密钥按旁边设的权重分得请求,比如 Max 账号设 5、Pro 账号设 1)或 <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>、<span class="ui">按权重</span>(每个账号或密钥按旁边设的权重分得请求,比如 Max 账号设 5、Pro 账号设 1)或 <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>
|
||||
@@ -184,7 +184,7 @@
|
||||
<tr><td>用完再换 <code>drain</code></td><td>一个账号或 Key 用到额度用完,再换下一个,并一直用它:前面的额度恢复了也不会切回去。被限流或出错的只在休息期间跳过。</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 小时额度、没有周额度的账号(如 Claude Enterprise)按 5 小时窗口的剩余额度除以距它重置的小时数算,所以几乎总排第一。账号里有比重置更早过期的积分时(如 WorkBuddy 签到得的积分),按最先过期的那部分除以距过期的小时数算,比周额度的更高就按它排。用到 90% 以上的等其他账号都答不了时才用。Key 按最近发给它的 token 数排。</td></tr>
|
||||
<tr><td>按权重 <code>weight</code></td><td>每个模型按群组编辑器里它旁边设的权重(1 到 1000,不设为 1)分得请求:权重 3 的模型每拿三个,权重 1 的拿一个,均匀穿插而不是成批。每个模型按它自己提供方的路由用自己的账号或 Key,群组里的群组算一个成员。失败后歇着的那个退出这一轮;一个失败时,下一个模型接上。</td></tr>
|
||||
<tr><td>速度优先 <code>fast</code></td><td>最近回答这个模型最快的成员、账号或 Key 先用:看首字时间和输出速度,越新的回答算得越重。相差不到一成的保持原来的顺序。一小时内没测过的每五个请求分到一个,慢过一次的渠道还会再试;失败后歇着的排最后。只测流式回复,重启后重新测。</td></tr>
|
||||
<tr><td>最便宜优先 <code>cheap</code></td><td>仅限路由组。此刻模型最便宜的成员先用,按 Usage 计费的方式算这个时段每百万输入、输出 token 的价格:你自己设的价格,否则用标价,再乘以提供方的价格倍率和分时倍率。DeepSeek 官方 API、Command Code 和 OpenCode Go 的 DeepSeek 模型在高峰时段(工作日 UTC 01:00–04:00 和 06:00–10:00)双倍计价,Ollama Cloud 的 DeepSeek V4.1 Flash 和 V4 Pro 则按它自己的高峰时段(工作日 UTC 12:00–18:00,其余时间半价),所以同一个 DeepSeek 模型挂在两个提供方上时,会交给这个时段更便宜的那个。价格相同的保持原来的顺序;不知道价格的排最后。</td></tr>
|
||||
@@ -192,7 +192,7 @@
|
||||
<div class="table-wrap"><table>
|
||||
<tr><th>会话保持</th><th>会话在回答过它的账号或 Key 上留多久</th></tr>
|
||||
<tr><td>自动 <code>auto</code></td><td>默认。一轮之内总是保持,跨轮则在厂商缓存还值得保留时保持。</td></tr>
|
||||
<tr><td>整个会话 <code>session</code></td><td>整个会话,只要它还能回答。路由为智能、最少使用或重置前用完时,新会话交给当前会话最少的账号或 Key,同时开的几个会话各占一个。</td></tr>
|
||||
<tr><td>整个会话 <code>session</code></td><td>整个会话,只要它还能回答。路由为智能、最少使用或到期前用完时,新会话交给当前会话最少的账号或 Key,同时开的几个会话各占一个。</td></tr>
|
||||
<tr><td>一轮之内 <code>turn</code></td><td>Agent 回传工具结果时不换;你再次发言时,路由重新决定。</td></tr>
|
||||
<tr><td>关闭 <code>off</code></td><td>每个请求都重新路由。</td></tr>
|
||||
<tr><td>严格 <code>strict</code></td><td>绝不换到别的账号或密钥,即使超过其用量上限也一样:它被限流或额度用完时,错误直接交给 Agent。新会话像“整个会话”一样分开。</td></tr>
|
||||
@@ -214,8 +214,8 @@
|
||||
<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 设为按顺序、轮流、用量少的优先、重置前用完或按权重时,在任何路由组里都保持这个路由:组拿它会先用的那个账号或 Key 来比,排到它时按它自己的顺序整体尝试。保持默认“智能”的服务商,它的账号和组里其他账号放在一起排,额度最先重置的排第一,不管属于哪个服务商。</li>
|
||||
<li><b>每一层按自己的路由。</b>外层组不管用什么路由,都不会伸进它里面的组:智能、轮流、最少使用、到期前用完都把子组当作一个成员,拿子组自己会先用的那个账号或 Key 来比;排到它时,子组按自己的顺序整体尝试。Coder 设为智能、里面放 Claude(按顺序)和 GPT(按顺序)两个组时,比较的是 Claude 组的第一个和 GPT 组的第一个,不会把两组的账号混在一起排。</li>
|
||||
<li><b>服务商自己的路由也一样。</b>一个模型的服务商把账号或 Key 设为按顺序、轮流、用量少的优先、到期前用完或按权重时,在任何路由组里都保持这个路由:组拿它会先用的那个账号或 Key 来比,排到它时按它自己的顺序整体尝试。保持默认“智能”的服务商,它的账号和组里其他账号放在一起排,额度最先重置的排第一,不管属于哪个服务商。</li>
|
||||
<li><b>故障转移照常。</b>子组里的模型全部失败时,由外层组的下一个成员接手,和其他成员一样。</li>
|
||||
<li>同一个模型出现两次(单独一次,子组里一次)时只问一次,按它第一次出现的位置。</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user