From af6de2cb95c62b71e124d926c5a33b21d7a272a1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:30:28 +0000 Subject: [PATCH] Move orchestration ID logic to constructor for efficiency Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com> --- packages/http-client/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/http-client/src/index.ts b/packages/http-client/src/index.ts index d216277c..d3c2c956 100644 --- a/packages/http-client/src/index.ts +++ b/packages/http-client/src/index.ts @@ -148,6 +148,8 @@ export class HttpClient { requestOptions?: ifm.RequestOptions ) { this.userAgent = userAgent + ? this._getUserAgentWithOrchestrationId(userAgent) + : undefined this.handlers = handlers || [] this.requestOptions = requestOptions if (requestOptions) { @@ -599,8 +601,7 @@ export class HttpClient { info.options.method = method info.options.headers = this._mergeHeaders(headers) if (this.userAgent != null) { - info.options.headers['user-agent'] = - this._getUserAgentWithOrchestrationId(this.userAgent) + info.options.headers['user-agent'] = this.userAgent } info.options.agent = this._getAgent(info.parsedUrl)