From e5ef1b0a3ddec805075633b1cd9b22f579357b42 Mon Sep 17 00:00:00 2001 From: antior <131586786+aantior@users.noreply.github.com> Date: Fri, 20 Nov 2026 19:27:32 +0800 Subject: [PATCH] docs: describe account concurrency priority --- internal/provider/concurrency.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/provider/concurrency.go b/internal/provider/concurrency.go index 384510cee..f2120711a 100644 --- a/internal/provider/concurrency.go +++ b/internal/provider/concurrency.go @@ -7,11 +7,10 @@ import ( "time" ) -// Concurrency is how many requests the gateway lets be out at the vendor -// at once on each of the provider's keys or accounts, 0 for no limit: the -// user's MaxConcurrency when they set one, else what the plugin giving the -// provider says it takes (its auth hook's maxConcurrency, or its -// package.json's magpie.maxConcurrency), else none. +// Concurrency is the provider-wide fallback for requests out at once on +// each key or account, 0 for no limit: the user's MaxConcurrency when set, +// else the plugin's static default. LaneLimit applies the account's manual +// and automatic limits before this fallback. func (p Provider) Concurrency() int { if p.MaxConcurrency != nil { return max(*p.MaxConcurrency, 0) @@ -122,9 +121,10 @@ const ( MaxQueueWait = 3600 ) -// LaneLimit is how many requests may be out at once on p's key or -// account, 0 for no limit: its own (AccountConcurrency), else the -// provider's (Concurrency). An account not had from All or AlsoOn (made +// LaneLimit is how many requests may be out at once on p's key or account, +// 0 for no limit: its own AccountConcurrency, else the provider's manual +// MaxConcurrency, else the plugin's account automatic value, else the +// plugin's static default. An account not had from All or AlsoOn (made // afresh by its sign-in) carries none of the provider's settings: they are // read from providers.json then. func (p Provider) LaneLimit() int {