maxpool 1.24.58 → 1.24.60
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/server.js +8 -2
- package/src/tui.js +8 -1
package/package.json
CHANGED
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
|
package/src/tui.js
CHANGED
|
@@ -2771,9 +2771,16 @@ export class TUI {
|
|
|
2771
2771
|
// views — a 5h tank refills ~33.6x per week, so the weekly figure is what a
|
|
2772
2772
|
// month of subscription actually buys. '--' until a tank reading AND a price exist.
|
|
2773
2773
|
const sesTankObj = this.am.capacityTank?.(i, 'ses');
|
|
2774
|
+
// Weekly-plan accounts: a measured weekly tank, or the derived form ses × 5.5 —
|
|
2775
|
+
// MEASURED weekly tanks run 5-7× the 5h tank (2026-10-31: glm1 1.27M→8.58M,
|
|
2776
|
+
// glm2 1.26M→6.85M, max+4 1.53M→7.21M): the weekly window holds ~5 full 5h
|
|
2777
|
+
// refills, not 33.6. The owner caught the ×33.6 error here ("your math seems
|
|
2778
|
+
// completely off"). weeklyAbsent plans (no weekly limit at all) keep ×33.6.
|
|
2779
|
+
const WK_PER_SES = 5.5;
|
|
2774
2780
|
const wkTank = (a.quota?.weeklyAbsent && a.type === 'provider')
|
|
2775
2781
|
? (sesTankObj?.avg ? Math.round(sesTankObj.avg * (7 * 24) / 5) : null)
|
|
2776
|
-
: (this.am.capacityTank?.(i, 'wk')?.avg
|
|
2782
|
+
: (this.am.capacityTank?.(i, 'wk')?.avg
|
|
2783
|
+
?? (a.type === 'provider' && sesTankObj?.avg ? Math.round(sesTankObj.avg * WK_PER_SES) : null));
|
|
2777
2784
|
const price = this.am.monthlyPriceFor?.(a);
|
|
2778
2785
|
const priceCell = (wkTank && price)
|
|
2779
2786
|
? '$' + (price / (wkTank / 1e6)).toFixed(2)
|