maxpool 1.5.34 → 1.5.35

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/tui.js +17 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.5.34",
3
+ "version": "1.5.35",
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/tui.js CHANGED
@@ -318,7 +318,14 @@ export class TUI {
318
318
  this.active.delete(id);
319
319
  const dur = r ? ((Date.now() - r.started) / 1000).toFixed(1) : '?';
320
320
  const acct = info.account || r?.account || '?';
321
- this._addLog(`${info.method} ${info.path} → ${acct} (${info.status}, ${dur}s)`);
321
+ // Tag PROVIDER-routed requests with the maxpool session id so provider traffic
322
+ // (when-exhausted overflow, or an incompatible-session pin) is traceable back to
323
+ // the session that caused it: grep the event log for `→ glm-fallback … [sess X]`,
324
+ // then `ps eww -p <pid> | grep x-maxpool-session` to find the terminal. Truthiness
325
+ // guard — a header-less request has sessionKey '' (server.js headerValue) → no tag.
326
+ const isProvider = this.am.accounts.find(a => a.name === acct)?.type === 'provider';
327
+ const tag = (isProvider && r?.sessionKey) ? ` [sess ${String(r.sessionKey).slice(0, 8)}]` : '';
328
+ this._addLog(`${info.method} ${info.path} → ${acct} (${info.status}, ${dur}s)${tag}`);
322
329
  }
323
330
 
324
331
  _addLog(msg) {
@@ -946,6 +953,15 @@ export class TUI {
946
953
  const p = this.am._crossProviderFallbackPolicy?.() || 'when-exhausted';
947
954
  const pc = p === 'never' ? yellow(p) : p === 'always' ? green(p) : cyan(p);
948
955
  xpText = ` ${dim('·')} ${dim('Cross-provider:')} ${pc}`;
956
+ // Overflow visibility: when GLM/Kimi actually served requests recently, surface the
957
+ // volume so provider traffic isn't a mystery — it's overflow that spilled here while
958
+ // OAuth was saturated. Reuses the SAME 15m load window as the per-row "15m Nr" column.
959
+ const now = Date.now();
960
+ let provReq = 0;
961
+ for (const a of this.am.accounts) {
962
+ if (a.type === 'provider') provReq += this.am._loadSummary?.(a, 15 * 60_000, now)?.requests || 0;
963
+ }
964
+ if (provReq > 0) xpText += ` ${dim('·')} ${yellow(`providers: ${provReq} req/15m`)}`;
949
965
  }
950
966
  lines.push(` Routing ${cyan(routing)}${xpText}`);
951
967
  const queuedCount = this.am.queueState?.waiting?.length || 0;