maxpool 1.5.73 → 1.5.74

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.js +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.5.73",
3
+ "version": "1.5.74",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/server.js CHANGED
@@ -1043,7 +1043,18 @@ async function forwardRequest(
1043
1043
  // self-heals instead of poisoning the session into a 400 loop. Signatures are
1044
1044
  // portable in practice (verified 2026-07-02); this only fires if Anthropic
1045
1045
  // ever account-binds them.
1046
- if (lease.migratedFromName && requestInfo.sessionKey
1046
+ // ONLY for a Claude→Claude migration. When the issuer is a PROVIDER, reverting
1047
+ // there is not a repair — the provider happily serves the request, but the
1048
+ // transcript keeps its provider-authored thinking blocks, so the very next turn
1049
+ // that routes back to Claude 400s on the SAME block. Measured 2026-08-09: the
1050
+ // same coordinate (messages.5.content.23) failed 4 times in 2 minutes, each one
1051
+ // "reverting to issuer glm max@gomokka.com" and never repairing anything.
1052
+ // The correct repair for a provider-authored block is the strip below.
1053
+ const issuer = lease.migratedFromName
1054
+ ? accountManager.accounts?.find(a => a.name === lease.migratedFromName)
1055
+ : null;
1056
+ const issuerIsClaude = issuer && issuer.type !== 'provider';
1057
+ if (lease.migratedFromName && issuerIsClaude && requestInfo.sessionKey
1047
1058
  && canRetryBufferedBody && retryCount + 1 < maxAttempts && !res.headersSent) {
1048
1059
  accountManager.revertSessionBinding(requestInfo.sessionKey, lease.migratedFromName);
1049
1060
  excludedIndexes.add(account.index);