mslxdff 0.1.97 → 0.1.99

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.
@@ -13,11 +13,13 @@ function isFastFailStatus(status) {
13
13
  return s === 429 || s === 502 || s === 503 || s === 504;
14
14
  }
15
15
 
16
- function shouldHedge({ isStream, canForwardPeers, hedgeDelayMs: d, hasPeers }) {
16
+ function shouldHedge({ isStream, canForwardPeers, hedgeDelayMs: d, hasPeers, model }) {
17
17
  if (!isStream) return false;
18
18
  if (!canForwardPeers) return false;
19
19
  if (!hasPeers) return false;
20
20
  if (!d || d <= 0) return false;
21
+ // deepseek = 本机私有凭据供应商(组员节点没有凭据),对冲必败且 both-fail 会误杀本地慢首块流(reasoner 思考 3-30s),不走组员
22
+ if (String(model || "").startsWith("deepseek/")) return false;
21
23
  return true;
22
24
  }
23
25
 
@@ -76,7 +76,8 @@ export async function setupProviders() {
76
76
  const customFactory = await getCustomProviderFactory(gid, base);
77
77
  if (customFactory) {
78
78
  if (gid === "workbuddy" && !keys.length) continue;
79
- if (gid !== "workbuddy" && (!base || !keys.length)) continue;
79
+ if (gid === "deepseek" && !keys.length) continue;
80
+ if (gid !== "workbuddy" && gid !== "deepseek" && (!base || !keys.length)) continue;
80
81
  try {
81
82
  const provider = gid === "workbuddy"
82
83
  ? await customFactory({ baseUrl: base || "https://copilot.tencent.com", apiKeys: keys, auths })