-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Open
Open
Copy link
Labels
area/enterpriseIssues related to Telemetry, Policy, Quota / LicensingIssues related to Telemetry, Policy, Quota / Licensing
Description
What would you like to be added?
I would like to request two related enhancements focused on enterprise environment configuration:
- Explicit Documentation for Proxies: Add a dedicated section to the documentation (e.g.,
docs/configuration/network.md) detailing how to configure the CLI behind corporate proxies. This should verify and document support for standard environment variables (HTTPS_PROXY,HTTP_PROXY,NO_PROXY) and how they interact with the CLI's internal fetch implementation (Undici). - Support & Documentation for Custom LLM Gateways: Add configuration support (via
settings.jsonor Environment Variable likeGEMINI_API_BASE_URL) to override the default API endpoint.- Currently,
packages/core/src/core/contentGenerator.tsinitializesGoogleGenAIwithout an option to override thebaseUrl. - This is required to route traffic through enterprise LLM Gateways (e.g., LiteLLM, Kong, Portkey) which mimic the Gemini API signature but run on custom domains.
- Currently,
Why is this needed?
- Enterprise Adoption: Most enterprise developers operate behind strict corporate firewalls and proxies (e.g., Zscaler). Without clear documentation on how to configure the CLI for these network topologies, adoption is blocked.
- Governance & Compliance: Large organizations often mandate the use of LLM Gateways to centralize API key management, log prompts for compliance, and enforce rate limits. The CLI currently defaults strictly to Google's public endpoints (
generativelanguage.googleapis.com), bypassing these required internal gateways. - Debugging: Identifying network issues in restrictive environments is difficult without explicit configuration options.
Additional context
-
Current Proxy Logic: I noticed in
packages/core/src/config/config.tsthatproxyis populated via environment variables:proxy: process.env['HTTPS_PROXY'] || process.env['https_proxy'] || process.env['HTTP_PROXY'] || process.env['http_proxy'],
And subsequently set in
packages/core/src/utils/fetch.tsusingundici'ssetGlobalDispatcher. Documentation just needs to surface this behavior clearly to users. -
Missing Gateway Logic: In
packages/core/src/core/contentGenerator.ts, theGoogleGenAIclient is initialized as follows:const googleGenAI = new GoogleGenAI({ apiKey: config.apiKey === '' ? undefined : config.apiKey, vertexai: config.vertexai, httpOptions, // Missing: baseUrl or similar override });
Adding support for a custom
baseUrlhere would enable compatibility with self-hosted gateways.
Metadata
Metadata
Assignees
Labels
area/enterpriseIssues related to Telemetry, Policy, Quota / LicensingIssues related to Telemetry, Policy, Quota / Licensing