Enhance proxy functionality with Vercel relay support

This commit is contained in:
decolua
2026-04-13 10:08:24 +07:00
parent b3feb96740
commit 89eb26dee2
15 changed files with 331 additions and 9 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ export class CursorExecutor extends BaseExecutor {
const transformedBody = this.transformRequest(model, body, stream, credentials);
try {
const shouldForceFetch = proxyOptions?.enabled === true || proxyOptions?.connectionProxyEnabled === true;
const shouldForceFetch = proxyOptions?.enabled === true || proxyOptions?.connectionProxyEnabled === true || !!proxyOptions?.vercelRelayUrl;
const response = (http2 && !shouldForceFetch)
? await this.makeHttp2Request(url, headers, transformedBody, signal)
: await this.makeFetchRequest(url, headers, transformedBody, signal, proxyOptions);