fix: externalize https-proxy-agent in bundle - #26551
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses runtime proxy failures by externalizing the 'https-proxy-agent' package from the main esbuild bundle. By allowing the package to be resolved via Node's native module resolver, it ensures compatibility with Vertex AI and gaxios proxy paths, resolving issues encountered when environment proxy variables are set. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request adds the https-proxy-agent dependency to the project, updating both package.json and package-lock.json. Additionally, it marks https-proxy-agent as an external dependency in the esbuild.config.js file. There are no review comments to address, and I have no further feedback to provide.
gemini-cli/qwen-code/crush/goose coverage: - google-gemini/gemini-cli#26551 externalize https-proxy-agent (man) - QwenLM/qwen-code#3865 persist channel sessions across restarts (man) - charmbracelet/crush#2807 oauth refresh in summarize path (man) - aaif-goose/goose#9047 settings moved into app shell with URL state (man)
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. This PR will be closed in 7 days if it remains without that designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
|
This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding. |
Summary
Fixes #26533.
Externalizes
https-proxy-agentfrom the main esbuild bundle so the Vertex AI / gaxios proxy path can load it through Node's runtime module resolver instead of using the bundled copy.This avoids proxy-agent runtime failures when
HTTP_PROXY/HTTPS_PROXYare set.Details
The proxy path in gaxios lazily imports
https-proxy-agent. When bundled into the CLI output, that dependency can hit bundling/runtime interop problems. Keeping it external preserves the package's normal runtime export shape.This PR also adds
https-proxy-agentto the root runtime dependencies so the published CLI package can resolve the externalized import after installation.Related Issues
Fixes #26533
How to Validate
npx prettier --check esbuild.config.js package.json package-lock.jsonnpm run bundlenpm packrequire.resolve('https-proxy-agent')succeeds from the clean installed packagenpm run preflightgit diff --checkPre-Merge Checklist