refactor(llm): inline proxy URL resolver (#129984)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Peter Steinberger
2026-08-26 01:05:24 -07:00
committed by GitHub
parent f26c053605
commit ccac43e3cd
+1 -6
View File
@@ -12,16 +12,11 @@ interface NodeHttpProxyAgents {
httpsAgent: HttpsAgent;
}
/** Resolves the environment proxy URL that applies to a target URL. */
function resolveHttpProxyUrlForTarget(targetUrl: string | URL): URL | undefined {
return resolveEnvNodeProxyUrlForTarget(targetUrl);
}
/** Builds fixed HTTP and HTTPS proxy agents for a target URL, when env proxy config applies. */
export function createHttpProxyAgentsForTarget(
targetUrl: string | URL,
): NodeHttpProxyAgents | undefined {
const proxyUrl = resolveHttpProxyUrlForTarget(targetUrl);
const proxyUrl = resolveEnvNodeProxyUrlForTarget(targetUrl);
if (!proxyUrl) {
return undefined;
}