maxpool 1.24.59 → 1.24.61
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 +5 -1
- package/src/server.js +8 -2
package/package.json
CHANGED
package/src/account-manager.js
CHANGED
|
@@ -1401,7 +1401,11 @@ export class AccountManager {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
const now = Date.now();
|
|
1403
1403
|
if (now < this.queueState.rampUntil && now - this.queueState.lastAdmissionAt < 250) return false;
|
|
1404
|
-
|
|
1404
|
+
// Remove THIS ticket, not the head: with the head-skip above, the admitted ticket
|
|
1405
|
+
// may not be waiting[0]. shift() here dropped the stuck head's ticket and left the
|
|
1406
|
+
// admitted one queued (found 2026-10-31 re-reading the shipped change).
|
|
1407
|
+
const pos = this.queueState.waiting.findIndex(t => t.id === ticket.id);
|
|
1408
|
+
if (pos >= 0) this.queueState.waiting.splice(pos, 1);
|
|
1405
1409
|
this.queueState.bytes = Math.max(0, this.queueState.bytes - (ticket.bytes || 0));
|
|
1406
1410
|
this.queueState.lastAdmissionAt = now;
|
|
1407
1411
|
requestInfo.queueTicket = null;
|
package/src/server.js
CHANGED
|
@@ -1495,7 +1495,13 @@ async function forwardRequest(
|
|
|
1495
1495
|
const effortMode = classifyEffortRejection(errorBody);
|
|
1496
1496
|
// A rejected effort level is a REQUEST-shaped fault, not an account-health signal —
|
|
1497
1497
|
// release neutral so it never charges a consecutive-failure to a healthy account.
|
|
1498
|
-
|
|
1498
|
+
// Same for a thinking-signature rejection: the TRANSCRIPT carries another
|
|
1499
|
+
// account's/provider's thinking, the Claude account itself is healthy, and the
|
|
1500
|
+
// strip-and-retry below recovers the request. Charging it a failure cooled healthy
|
|
1501
|
+
// accounts and filled the screen with red counts (2026-10-31: 26 such 400s across
|
|
1502
|
+
// 14 sessions, every one recovered, while kira + max@gomokka.com showed 39/40 failed).
|
|
1503
|
+
const neutral = Boolean(effortMode) || errorType === 'invalid_thinking_signature';
|
|
1504
|
+
accountManager.releaseAccount(lease, neutral
|
|
1499
1505
|
? { status: upstreamRes.status, error: errorType, neutral: true }
|
|
1500
1506
|
: { status: upstreamRes.status, error: errorType });
|
|
1501
1507
|
|
|
@@ -1505,7 +1511,7 @@ async function forwardRequest(
|
|
|
1505
1511
|
writeRequestLog(logDir, reqId, logSections);
|
|
1506
1512
|
}
|
|
1507
1513
|
if (errorType === 'invalid_thinking_signature') {
|
|
1508
|
-
console.log(`[Maxpool]
|
|
1514
|
+
console.log(`[Maxpool] Transcript carries another provider's thinking; stripping and retrying (account "${account.name}" is fine, not penalized)`);
|
|
1509
1515
|
// Fail-safe: if this request had been MIGRATED to a different Claude account
|
|
1510
1516
|
// this turn (cross-account thinking rebalance), the rejected block was issued
|
|
1511
1517
|
// by the PRE-MIGRATION account. Revert the session there, exclude the failed
|