Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copilot: Support HTTP/HTTPS proxy for Copilot language server #24364

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

eli-kaplan
Copy link

@eli-kaplan eli-kaplan commented Feb 6, 2025

Closes #6701 (one of the top ranking issues as of writing)

Adds the ability to specify an HTTP/HTTPS proxy to route Copilot code completion API requests through. This should fix copilot functionality in restricted network environments (where such a proxy is required) but also opens up the ability to point copilot code completion requests at your own local LLM, using e.g.:

External MITM-proxy tools permitting, this can serve as a stop-gap to allow local LLM code completion in Zed until a proper OpenAI-compatible local code completions provider is implemented. With this in mind, in this PR I've added separate settings.json variables to configure a proxy server specific to the code completions provider instead of using the global proxy setting, to allow for cases like this where we only want to proxy e.g. the Copilot requests, but not all outgoing traffic from the application.

Currently, two new settings are added:

  • inline_completions.copilot.proxy: Proxy server URL (HTTP and HTTPS schemes supported)
  • inline_completions.copilot.proxy_no_verify: Whether to disable certificate verification through the proxy

Example:

"features": {
  "inline_completion_provider": "copilot"
},
"show_completions_on_input": true,
// New:
"inline_completions": {
  "copilot": {
    "proxy": "http://example.com:15432",
    "proxy_no_verify": true
  }
}

Release Notes:

  • Added the ability to specify an HTTP/HTTPS proxy for Copilot.

Copy link

cla-bot bot commented Feb 6, 2025

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Eli Kaplan.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@eli-kaplan eli-kaplan force-pushed the support-copilot-http-proxy branch from 12c5452 to 9fa24c4 Compare February 6, 2025 08:35
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 6, 2025
@maxdeviant maxdeviant changed the title Support HTTP(s) proxy for Copilot code completions language server Support HTTP(S) proxy for Copilot code completions language server Feb 6, 2025
@maxdeviant maxdeviant changed the title Support HTTP(S) proxy for Copilot code completions language server copilot: Support HTTP/S proxy for Copilot language server Feb 6, 2025
@maxdeviant maxdeviant changed the title copilot: Support HTTP/S proxy for Copilot language server copilot: Support HTTP/HTTPS proxy for Copilot language server Feb 6, 2025
@maxdeviant maxdeviant self-assigned this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

copilot does not respect proxy
2 participants