Skip to content

fix(fetch): honor proxy and verifySsl on the node fetch path#12993

Open
devYRPauli wants to merge 2 commits into
continuedev:mainfrom
devYRPauli:fix/node-fetch-honor-proxy-verifyssl
Open

fix(fetch): honor proxy and verifySsl on the node fetch path#12993
devYRPauli wants to merge 2 commits into
continuedev:mainfrom
devYRPauli:fix/node-fetch-honor-proxy-verifyssl

Conversation

@devYRPauli

Copy link
Copy Markdown

Problem

proxy, verifySsl, and caBundlePath set in config.yml were ignored by the remote config-sync / index-cache client. core/continueServer/stubs/client.ts used the global fetch() directly for its requests, so unlike the LLM request path (which already routes through fetchwithRequestOptions), these node fetches never applied the configured request options.

Fix

Route the ContinueServerClient requests (getConfig, getFromIndexCache, sendFeedback) through fetchwithRequestOptions, and thread config.requestOptions in from the single call site in core/indexing/CodebaseIndexer.ts. The new constructor parameter is optional, so existing callers are unaffected.

Test

Added packages/fetch/src/fetch.test.ts asserting the agent is an HttpsProxyAgent pointed at requestOptions.proxy, that rejectUnauthorized is false when verifySsl: false, and both together. The packages/fetch suite passes (100 tests).

Fixes #12956.

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.
@devYRPauli devYRPauli requested a review from a team as a code owner July 16, 2026 17:24
@devYRPauli devYRPauli requested review from sestinj and removed request for a team July 16, 2026 17:24
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 16, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

const target = redirectTo.startsWith("http")
? redirectTo
: `/docs${redirectTo}`;

P2 Badge Avoid prefixing standalone docs redirects with /docs

For any internal redirect from docs.json (for example /cli/overview -> /cli/quickstart), this sends the browser to /docs/cli/quickstart. The standalone docs app already strips /docs for normal links via resolveHref, and generateStaticParams creates pages like /cli/quickstart, not /docs/cli/quickstart, so these redirect pages land on a non-existent route/404 on the docs subdomain. Use the same href resolution as the rest of the docs shell or redirect directly to redirectTo.


continue/core/core.ts

Lines 1138 to 1142 in 42a1879

return await fetchModels(
msg.data.provider,
msg.data.apiKey,
msg.data.apiBase,
);

P2 Badge Thread requestOptions into dynamic model fetches

When the Add Model UI calls this new models/fetch handler, only provider/API key/API base are passed through, so the implementations in core/llm/fetchModels.ts use native fetch or an LLM created without requestOptions. In environments that require config.requestOptions.proxy, caBundlePath, or verifySsl: false, dynamic model loading for OpenRouter/Anthropic/Gemini/Ollama fails even though normal LLM requests honor those settings. Load the current config here and pass its request options into the fetch path.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proxy and VerifySsl settings in config.yml are ignored by node.js process

1 participant