maxpool 1.24.76 → 1.24.77

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 +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.24.76",
3
+ "version": "1.24.77",
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
@@ -3496,7 +3496,15 @@ function describeRequest(req, body) {
3496
3496
  // 1,360 tagged turns unique on 2026-11-08), which made the affinity inert and
3497
3497
  // the join useless. Strip cache_control (and any future positioning hints)
3498
3498
  // before hashing; identity = system text + first message CONTENT.
3499
- const stable = (v) => JSON.stringify(v, (k, val) => (k === 'cache_control' || k === '_pf') ? undefined : val);
3499
+ // Positioning markers AND Claude Code's billing header both change per request:
3500
+ // the first system block carries `x-anthropic-billing-header: … cch=<checksum>;
3501
+ // cc_prev_req=<id>; …` whose values differ every turn (measured on live traffic
3502
+ // 2026-11-08: identical 170,024-char systems differing only inside that header).
3503
+ // Identity must come from CONTENT: drop cache_control/_pf keys and skip any
3504
+ // system block that starts with x-anthropic-billing-header.
3505
+ const stable = (v) => JSON.stringify(
3506
+ Array.isArray(v) ? v.filter(b => !(b && typeof b === 'object' && String(b.text || '').startsWith('x-anthropic-billing-header'))) : v,
3507
+ (k, val) => (k === 'cache_control' || k === '_pf') ? undefined : val);
3500
3508
  info.conversationHash = createHash('sha256')
3501
3509
  .update(stable(json.system ?? ''))
3502
3510
  .update('\u0000')