@declaw/sdk 1.2.2 → 1.2.3

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/dist/index.js CHANGED
@@ -137,7 +137,7 @@ function getDispatcher() {
137
137
  }
138
138
  const undici = await import("undici");
139
139
  const connOverride = parseInt(process.env.DECLAW_SDK_CONNECTIONS || "", 10);
140
- const connections = Number.isFinite(connOverride) && connOverride > 0 ? connOverride : 512;
140
+ const connections = Number.isFinite(connOverride) && connOverride > 0 ? connOverride : 64;
141
141
  const streamsOverride = parseInt(process.env.DECLAW_SDK_MAX_CONCURRENT_STREAMS || "", 10);
142
142
  const maxConcurrentStreams = Number.isFinite(streamsOverride) && streamsOverride > 0 ? streamsOverride : 1e3;
143
143
  return new undici.Agent({
@@ -154,7 +154,9 @@ function getDispatcher() {
154
154
  // stream — silently defeating the H2 multiplexing that allowH2 enables.
155
155
  // Omitted, H2 sessions default to unlimited concurrent streams (capped
156
156
  // by maxConcurrentStreams) and H1.1 fallback defaults to 1 (safe, no
157
- // head-of-line risk on non-idempotent POSTs).
157
+ // head-of-line risk on non-idempotent POSTs). This is the single
158
+ // biggest burst-latency lever: with pipelining:1 a 100-concurrent burst
159
+ // queued ~36 requests behind the `connections` cap.
158
160
  allowH2: true,
159
161
  connect: { keepAlive: true, keepAliveInitialDelay: 5e3 }
160
162
  });