OpenBMB / OpenBMB/PilotDeck

bug(proxy): proxy.noProxy is ignored on cold start and UI runtime env

Open
#253 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4k
Forks
453
Avg merge
12h 30m
Merged PRs (30d)
46

Description

Summary

proxy.noProxy is supported by the proxy helper and hot-reload path, but it is not passed during CLI cold start or into the UI runtime environment.

Why it matters

A user can configure proxy.noProxy to bypass a proxy for localhost, internal services, or specific domains. After hot reload, that value can be respected, but on cold start and in the UI runtime env the same config is ignored. This makes proxy behavior depend on how PilotDeck was started or reloaded.

Evidence

  • ui/src/components/settings/view/tabs/PilotDeckConfigTab.tsx:690 exposes and writes proxy.noProxy.
  • src/cli/proxy.ts:46 defines installGlobalProxy(explicitUrl?: string, extraNoProxy?: string), so the helper accepts a no-proxy value.
  • src/cli/proxy.ts:150 to src/cli/proxy.ts:154 builds the effective no-proxy list from process env, extraNoProxy, 127.0.0.1, and localhost.
  • src/cli/pilotdeck.ts:37 calls installGlobalProxy(snapshot.config.proxy.url) during initial startup and does not pass snapshot.config.proxy.noProxy.
  • src/cli/pilotdeck.ts:151 calls reinstallGlobalProxy(proxyConfig?.url, proxyConfig?.noProxy) on hot reload, so the reload path has the value that cold start omits.
  • ui/server/services/pilotdeckConfig.js:306 defines buildRuntimeEnv(config).
  • ui/server/services/pilotdeckConfig.js:321 to ui/server/services/pilotdeckConfig.js:327 sets only HTTPS_PROXY and https_proxy; it does not set NO_PROXY or no_proxy.

Validation

Validation level: dynamic plus source control-flow confirmation.

Reproduction called buildRuntimeEnv({ proxy: { url, noProxy } }).

Key output: the returned env included HTTPS_PROXY, but NO_PROXY was absent/null. Source control flow confirms the CLI startup path also drops noProxy, while the hot-reload path passes it.

Boundary: this did not perform a live network request through a real proxy. The failure is at config propagation: the configured field is present, the helper supports it, but two runtime entry points do not pass it.

Expected behavior

proxy.noProxy should be applied consistently across cold start, hot reload, and the UI runtime environment.

Existing coverage checked

Partially covered by adjacent work only. PR #239 improved proxy/no-proxy support in the helper and dispatcher layer, and PR #158 brought top-level proxy/noProxy config into the Settings area. However, current main still omits proxy.noProxy at src/cli/pilotdeck.ts:37 and does not export it from buildRuntimeEnv(...).

Coverage checked by searching for proxy.noProxy, installGlobalProxy, reinstallGlobalProxy, NO_PROXY, and buildRuntimeEnv proxy.

Suggested fix

Pass snapshot.config.proxy.noProxy into the initial startup call:

installGlobalProxy(snapshot.config.proxy.url, snapshot.config.proxy.noProxy)

Also update buildRuntimeEnv(...) to set both NO_PROXY and no_proxy when normalized.proxy?.noProxy is configured.

Suggested tests

  • Cold start passes configured proxy.noProxy to installGlobalProxy(...).
  • Hot reload continues to pass updated proxy.noProxy.
  • buildRuntimeEnv(...) returns HTTPS_PROXY, https_proxy, NO_PROXY, and no_proxy when both proxy URL and no-proxy list are configured.
  • Existing behavior remains unchanged when only proxy URL is configured.
  • Existing behavior remains unchanged when proxy config is absent.

Submitted with Codex.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/cli/pilotdeck.ts:37 and compare its cold-start call with the hot-reload call at lines 151-154, then inspect buildRuntimeEnv(config) in ui/server/services/pilotdeckConfig.js:306. Trace the existing proxy helper in src/cli/proxy.ts and add or update focused tests for cold start and runtime environment propagation. Done means configured noProxy is applied consistently while behavior without proxy settings remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.