Even though the configuration allows you to point GitHub Copilot to a local Ollama server, keep in mind that this does not guarantee that prompts or other data will not be sent to Microsoft. GitHub Copilot may still transmit usage data or requests depending on your setup and account. Use with caution if privacy is a concern.


Steps

  1. Open VS Code Settings

    • In VS Code, go to the menu bar and select
      File → Preferences → Settings (or press Ctrl+, on Windows/Linux, Cmd+, on macOS).

  2. Search for GitHub Copilot

    • In the search bar at the top of the settings panel, type:
      GitHub Copilot

  3. Locate the BYOK Ollama Endpoint Setting

    • Scroll down to GitHub › Copilot › Chat › Byok: Ollama Endpoint.

    • This field allows you to provide your own server endpoint.

  4. Enter Your Ollama Server Address

    • Typically, the local Ollama server runs at:

      http://localhost:11434
    • Paste this URL (or the address of your own Ollama instance) into the setting.

  5. Restart VS Code (recommended)

    • After saving the setting, restart VS Code to ensure GitHub Copilot picks up the configuration.


✅ Now GitHub Copilot should attempt to route chat requests through the specified Ollama server.
⚠️ Reminder: This configuration does not make Copilot fully “local only.” Prompts and metadata may still be shared with Microsoft’s services.