GitHub Copilot

Configure GitHub Copilot in VS Code to use agentgateway deployed in Kubernetes.

ℹ️
Custom endpoint configuration for GitHub Copilot requires a GitHub Copilot Business or Enterprise plan. Individual Copilot plans do not support custom proxy endpoints.

Before you begin

  1. Set up an agentgateway proxy.
  2. Set up access to the OpenAI LLM provider.
3. Install the GitHub Copilot extension in VS Code. 4. Have a GitHub Copilot Business or Enterprise subscription.

Get the gateway URL

export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
  -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

echo "Gateway address: $INGRESS_GW_ADDRESS"
export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
  -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

echo "Gateway address: $INGRESS_GW_ADDRESS"

After port-forwarding, the gateway is accessible at http://localhost:8080. Use localhost:8080 wherever the instructions reference $INGRESS_GW_ADDRESS.

kubectl port-forward -n agentgateway-system svc/agentgateway-proxy 8080:80

Configure GitHub Copilot

  1. Open VS Code Settings (Cmd + , on macOS, Ctrl + , on Windows/Linux).

  2. Search for github.copilot in the settings search bar.

  3. Set the proxy URL to your agentgateway address. Click Edit in settings.json and add:

    {
      "github.copilot.advanced": {
        "debug.overrideProxyUrl": "http://<INGRESS_GW_ADDRESS>/<route-path>"
      }
    }

    For example, if your HTTPRoute uses path /openai, use http://<INGRESS_GW_ADDRESS>/openai.

  4. Save the file and reload VS Code (Cmd + Shift + P > Developer: Reload Window).

Verify the connection

  1. Open a code file in VS Code.
  2. Start typing and wait for Copilot suggestions to appear.
  3. Open the Copilot chat panel and send a test message.
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.