maxpool 1.5.71 → 1.5.73
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 +11 -0
package/package.json
CHANGED
package/src/account-manager.js
CHANGED
|
@@ -1191,6 +1191,17 @@ export class AccountManager {
|
|
|
1191
1191
|
* body signal only — never the session-sticky policy — and fails CLOSED on any
|
|
1192
1192
|
* body we couldn't fully scan (non-JSON / parse error → bodyThinkingScanned unset). */
|
|
1193
1193
|
_migrationSafeForRequest(requestInfo = {}) {
|
|
1194
|
+
// A same-PROVIDER migration (GLM→GLM, Kimi→Kimi) is always safe: the thinking
|
|
1195
|
+
// format is identical on both sides, so there is no cross-format replay risk.
|
|
1196
|
+
// The body-scanning gate below exists for Anthropic cross-account migration
|
|
1197
|
+
// (where a signed thinking block replayed to a different account can 400). It
|
|
1198
|
+
// was blocking provider rebalancing entirely — a GLM session bound to an account
|
|
1199
|
+
// at 92% weekly stayed there forever because bodyThinkingScanned was never set
|
|
1200
|
+
// on provider-origin requests (no Anthropic thinking blocks to scan).
|
|
1201
|
+
const boundName = this._sessionBinding(requestInfo.sessionKey)?.currentName;
|
|
1202
|
+
const boundAcct = boundName ? this.accounts.find(a => a.name === boundName) : null;
|
|
1203
|
+
if (boundAcct?.type === 'provider') return true;
|
|
1204
|
+
|
|
1194
1205
|
// Fail closed on any body we couldn't fully scan (non-JSON / parse error).
|
|
1195
1206
|
if (requestInfo.bodyThinkingScanned !== true) return false;
|
|
1196
1207
|
// An Anthropic-incompatible (provider-pinned) session's only possible cross is
|