fix(fetch): honor proxy and verifySsl on the node fetch path#12993
fix(fetch): honor proxy and verifySsl on the node fetch path#12993devYRPauli wants to merge 2 commits into
Conversation
The remote config-sync/index-cache client (core/continueServer/stubs/client.ts) used the global fetch() and ignored config.yml requestOptions entirely, so proxy, verifySsl, and caBundlePath had no effect on those requests even though the LLM request path (fetchwithRequestOptions) already applied them correctly. Route the client through fetchwithRequestOptions and pass config.requestOptions through from CodebaseIndexer.
💡 Codex Reviewcontinue/docs-site/app/[[...slug]]/page.tsx Lines 69 to 71 in 42a1879 For any internal redirect from Lines 1138 to 1142 in 42a1879 When the Add Model UI calls this new ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…n types fetchwithRequestOptions types json() as unknown (stricter than the global fetch's any), so getConfig/getFromIndexCache need an explicit cast to their declared return types to satisfy the type check.
Problem
proxy,verifySsl, andcaBundlePathset in config.yml were ignored by the remote config-sync / index-cache client.core/continueServer/stubs/client.tsused the globalfetch()directly for its requests, so unlike the LLM request path (which already routes throughfetchwithRequestOptions), these node fetches never applied the configured request options.Fix
Route the
ContinueServerClientrequests (getConfig,getFromIndexCache,sendFeedback) throughfetchwithRequestOptions, and threadconfig.requestOptionsin from the single call site incore/indexing/CodebaseIndexer.ts. The new constructor parameter is optional, so existing callers are unaffected.Test
Added
packages/fetch/src/fetch.test.tsasserting the agent is anHttpsProxyAgentpointed atrequestOptions.proxy, thatrejectUnauthorizedisfalsewhenverifySsl: false, and both together. Thepackages/fetchsuite passes (100 tests).Fixes #12956.