maxpool 1.24.97 → 1.24.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/account-manager.js +21 -3
- package/src/server.js +14 -0
- package/src/tui.js +5 -1
package/package.json
CHANGED
package/src/account-manager.js
CHANGED
|
@@ -1253,7 +1253,19 @@ export class AccountManager {
|
|
|
1253
1253
|
// A pinned refusal (busy / unavailable / throttled cloud row) never reached the
|
|
1254
1254
|
// client: one BOUNCED load event, no failure counters, no streak, no error text.
|
|
1255
1255
|
if (outcome.bounced) {
|
|
1256
|
-
|
|
1256
|
+
// ONE bounced request per row, however many queue releases it refuses on: a
|
|
1257
|
+
// request held in the queue re-asks the same full row every release, and counting
|
|
1258
|
+
// each refusal read "bounced 69%" when far fewer requests were ever refused
|
|
1259
|
+
// (2026-11-16). The event is still recorded (lease accounting); repeats are flagged
|
|
1260
|
+
// and left out of every bounced/refused count.
|
|
1261
|
+
const ri = lease.requestInfo;
|
|
1262
|
+
let repeat = false;
|
|
1263
|
+
if (ri) {
|
|
1264
|
+
ri._bouncedOn ||= new Set();
|
|
1265
|
+
repeat = ri._bouncedOn.has(account.name);
|
|
1266
|
+
ri._bouncedOn.add(account.name);
|
|
1267
|
+
}
|
|
1268
|
+
this._recordLoadEvent(account, lease, { ...outcome, success: false, bounced: true, repeatBounce: repeat });
|
|
1257
1269
|
return;
|
|
1258
1270
|
}
|
|
1259
1271
|
|
|
@@ -1320,6 +1332,7 @@ export class AccountManager {
|
|
|
1320
1332
|
status: outcome.status || null,
|
|
1321
1333
|
// Efficiency telemetry (2026-11-15) — optional, read by _efficiencySummary only.
|
|
1322
1334
|
bounced: Boolean(outcome.bounced),
|
|
1335
|
+
repeatBounce: Boolean(outcome.repeatBounce),
|
|
1323
1336
|
usage: outcome.usage || null,
|
|
1324
1337
|
moved: Boolean(outcome.moved),
|
|
1325
1338
|
newConversation: Boolean(outcome.newConversation),
|
|
@@ -1370,6 +1383,7 @@ export class AccountManager {
|
|
|
1370
1383
|
for (const e of account.loadEvents || []) {
|
|
1371
1384
|
if (e.at < since || e.countTokens) continue;
|
|
1372
1385
|
if (e.bounced) {
|
|
1386
|
+
if (e.repeatBounce) continue;
|
|
1373
1387
|
out.bounced++;
|
|
1374
1388
|
if (e.refusal && e.refusal !== 'busy') out.refused++;
|
|
1375
1389
|
continue;
|
|
@@ -1475,7 +1489,7 @@ export class AccountManager {
|
|
|
1475
1489
|
const all = (account.loadEvents || []).filter(e => e.at >= since);
|
|
1476
1490
|
// A BOUNCE (pinned refusal, 2026-11-15) never served anything: out of every
|
|
1477
1491
|
// denominator — requests, weight (spread share), avgMs — and out of `failed`.
|
|
1478
|
-
const bounced = all.filter(e => e.bounced).length;
|
|
1492
|
+
const bounced = all.filter(e => e.bounced && !e.repeatBounce).length;
|
|
1479
1493
|
const events = all.filter(e => !e.bounced);
|
|
1480
1494
|
const requests = events.length;
|
|
1481
1495
|
// "failed" is what the operator reads as the ACCOUNT misbehaving; a link fault is
|
|
@@ -3010,7 +3024,11 @@ export class AccountManager {
|
|
|
3010
3024
|
// conversation leaves its last account (bounded by moves, not by requests).
|
|
3011
3025
|
const ckey = this._affinityKey(requestInfo);
|
|
3012
3026
|
const lastName = ckey ? this.conversationLastAccount.get(ckey) : null;
|
|
3013
|
-
|
|
3027
|
+
const moveKey = lastName ? `${lastName}>${best.name}` : null;
|
|
3028
|
+
if (lastName && lastName !== best.name && requestInfo?._movedLogged !== moveKey) {
|
|
3029
|
+
// One line per request per move: a queued request re-routes on every release and
|
|
3030
|
+
// used to log the same move each time (29× in 27 min for one request, 2026-11-16).
|
|
3031
|
+
requestInfo._movedLogged = moveKey;
|
|
3014
3032
|
// why= explains why the conversation LEFT its last account — measured against
|
|
3015
3033
|
// the loop's own pick, before any return-home switch.
|
|
3016
3034
|
let why = 'unknown';
|
package/src/server.js
CHANGED
|
@@ -1377,6 +1377,13 @@ async function forwardRequest(
|
|
|
1377
1377
|
&& !requestInfo.queueHeartbeatActive) {
|
|
1378
1378
|
ensureQueueHeartbeatInterval(res, requestInfo, Math.max(1000, Number(queueConfig?.heartbeatMs) || 10_000));
|
|
1379
1379
|
}
|
|
1380
|
+
// A refusal the cloud pool relays (4xx, not 429 — those have their own branches)
|
|
1381
|
+
// used to pass through with nothing logged here, so a 400 on a ☁ row had no
|
|
1382
|
+
// recorded reason on this side (2026-11-16: 13 instant 400/404s, cause unknowable).
|
|
1383
|
+
// Keep the first bytes while relaying them unchanged; log the reason at the end,
|
|
1384
|
+
// the same line shape as the direct path.
|
|
1385
|
+
const refusalTap = (upRes.status >= 400 && upRes.status < 500 && upRes.status !== 429) ? [] : null;
|
|
1386
|
+
let refusalTapBytes = 0;
|
|
1380
1387
|
if (upRes.body) {
|
|
1381
1388
|
const reader = upRes.body.getReader();
|
|
1382
1389
|
// R3-3/r4: bound the link body like the direct path bounds its stream
|
|
@@ -1417,11 +1424,18 @@ async function forwardRequest(
|
|
|
1417
1424
|
accountManager.noteConversationServed?.(requestInfo, account);
|
|
1418
1425
|
tapLinkUsage(value, requestInfo);
|
|
1419
1426
|
}
|
|
1427
|
+
if (refusalTap && refusalTapBytes < 4096) { refusalTap.push(Buffer.from(value)); refusalTapBytes += value.length; }
|
|
1420
1428
|
res.write(Buffer.from(value));
|
|
1421
1429
|
}
|
|
1422
1430
|
} finally { try { await reader.cancel(); } catch { /* already done */ } }
|
|
1423
1431
|
if (upRes.status < 300) tapLinkUsage(null, requestInfo); // flush the non-stream tail
|
|
1424
1432
|
}
|
|
1433
|
+
if (refusalTap) {
|
|
1434
|
+
const text = Buffer.concat(refusalTap).toString('utf8');
|
|
1435
|
+
let why = text;
|
|
1436
|
+
try { why = JSON.parse(text)?.error?.message || text; } catch { /* not JSON — log raw */ }
|
|
1437
|
+
console.log(`[Maxpool] ${upRes.status} from "${account.name}": ${String(why).slice(0, 300)}`);
|
|
1438
|
+
}
|
|
1425
1439
|
res.end(); // an empty 2xx body: the heartbeat reaps itself on res.writableEnded
|
|
1426
1440
|
finishLink({ success: ctx.status < 500, status: ctx.status });
|
|
1427
1441
|
// SC22 no-double-count: this request was counted at auth; the serving pool
|
package/src/tui.js
CHANGED
|
@@ -3326,7 +3326,11 @@ export class TUI {
|
|
|
3326
3326
|
for (const tag of settingsTags(this.am, a)) note += ` ${tag}`;
|
|
3327
3327
|
|
|
3328
3328
|
const bars = [];
|
|
3329
|
-
|
|
3329
|
+
// Fable is an Anthropic model family: a provider (GLM, Kimi, …) has no such limit,
|
|
3330
|
+
// so its row shows blank space where an OAuth row draws "Fbl <bar>" (owner
|
|
3331
|
+
// 2026-11-16: "why does it say Fable for GLM? That makes no sense"). Same visible
|
|
3332
|
+
// width ("Fbl " + bar), so Ses and Wk stay in the OAuth rows' columns.
|
|
3333
|
+
if (showFable) bars.push(' '.repeat(4 + bw));
|
|
3330
3334
|
if (showSession) bars.push(`Ses ${sesCell}`);
|
|
3331
3335
|
if (showBoth) bars.push(`Wk ${wkCell}`);
|
|
3332
3336
|
let line = ` ${sel}${cur} ${name} ${whereCell(a)} ${type} ${status} ${bars.join(' ')}`;
|