You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: wire h2-transport into the SDK as the HTTP/2 backend
Replace the undici-based HTTP/2 transport with the native node:http2
h2-transport library. The `http2` client option now accepts `boolean`
or `H2FetchOptions` (pool size, timeouts) instead of an undici
Dispatcher.
- Swap createUndiciFetch for createH2Fetch in node-runtime shims
- Update http2 option type from Dispatcher to H2FetchOptions
- Tune default httpAgent with higher socket limits for mixed workloads
- Update tests and docs to reflect the new transport
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* The maximum number of times that the client will retry a request in case of a
@@ -377,7 +359,7 @@ export class Runloop extends Core.APIClient {
377
359
* @param {number} [opts.timeout=30 seconds] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
378
360
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
379
361
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
380
-
* @param {boolean | import('undici').Dispatcher} [opts.http2=false] - Send requests over HTTP/2 (Node only; ignored when `fetch` is provided). `true` uses the default bounded pool; pass an undici `Dispatcher` to control the pool yourself.
362
+
* @param {boolean | H2FetchOptions} [opts.http2=false] - Send requests over HTTP/2 (Node only; ignored when `fetch` is provided). `true` uses the default bounded pool; pass H2FetchOptions to tune.
381
363
* @param {number} [opts.maxRetries=5] - The maximum number of times the client will retry a request.
382
364
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
383
365
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
@@ -399,16 +381,14 @@ export class Runloop extends Core.APIClient {
399
381
baseURL: baseURL||`https://api.runloop.ai`,
400
382
};
401
383
402
-
// `httpAgent` (a Node `http.Agent`) does not apply to the HTTP/2 transport —
403
-
// undici manages its own dispatcher and has no `http.Agent` concept. Warn once
404
-
// instead of silently ignoring it. (Skipped when a custom `fetch` supersedes
405
-
// `http2` entirely.)
384
+
// `httpAgent` does not apply to the HTTP/2 transport — it manages its own
385
+
// persistent connections. Warn once instead of silently ignoring.
0 commit comments