@declaw/sdk 1.1.8 → 1.1.9

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.cjs CHANGED
@@ -246,9 +246,16 @@ function getDispatcher() {
246
246
  }
247
247
  const undici = await import("undici");
248
248
  const connOverride = parseInt(process.env.DECLAW_SDK_CONNECTIONS || "", 10);
249
- const connections = Number.isFinite(connOverride) && connOverride > 0 ? connOverride : 64;
249
+ const connections = Number.isFinite(connOverride) && connOverride > 0 ? connOverride : 256;
250
+ const streamsOverride = parseInt(process.env.DECLAW_SDK_MAX_CONCURRENT_STREAMS || "", 10);
251
+ const maxConcurrentStreams = Number.isFinite(streamsOverride) && streamsOverride > 0 ? streamsOverride : 1e3;
250
252
  return new undici.Agent({
251
253
  connections,
254
+ // maxConcurrentStreams only matters on H2 connections. undici negotiates
255
+ // down to whatever the server advertises in SETTINGS_MAX_CONCURRENT_STREAMS,
256
+ // so setting a high value here is safe — it caps the client-side intent,
257
+ // server still wins.
258
+ maxConcurrentStreams,
252
259
  keepAliveTimeout: 3e4,
253
260
  keepAliveMaxTimeout: 6e4,
254
261
  pipelining: 1,