For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
GitHub Copilot
Configure GitHub Copilot to use agentgateway
Configure GitHub Copilot in VS Code to route requests through agentgateway.
Note
Custom endpoint configuration for GitHub Copilot requires a GitHub Copilot Business or Enterprise plan. Individual Copilot plans do not support custom proxy endpoints. For more information, see the GitHub Copilot documentation.
Before you begin
- Install the
agentgatewaybinary. - Install VS Code with the GitHub Copilot extension.
- Have a GitHub Copilot Business or Enterprise subscription.
Tip
If you manage models and virtual API keys in the standalone Admin UI, Client Setup can generate the connection settings or snippet for this client. Review the gateway URL, select a model and key, choose the client from the Integration dropdown, and copy the recipe. Each recipe uses only the values that its client supports.
Client Setup generates client-side values from existing configuration. It does not create a route, model, authentication policy, virtual key, or provider credential. Follow the steps in this guide to configure those prerequisites or to set up the client manually.
Example agentgateway configuration
cat > /tmp/test-copilot.yaml << 'EOF'
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
llm:
port: 3000
models:
- name: "*"
provider: openAI
params:
apiKey: "$OPENAI_API_KEY"
EOFConfigure GitHub Copilot
Open VS Code Settings (
Cmd + ,on macOS,Ctrl + ,on Windows/Linux).Search for
github.copilotin the settings search bar.Set the proxy URL to your agentgateway address. Click Edit in settings.json and add:
{ "github.copilot.advanced": { "debug.overrideProxyUrl": "http://localhost:3000/v1" } }Save the file and reload VS Code (
Cmd + Shift + P> Developer: Reload Window).
Verify the connection
- Open a code file in VS Code.
- Start typing and wait for Copilot suggestions to appear.
- Open the Copilot chat panel (
Cmd + Shift + Ion macOS,Ctrl + Shift + Ion Windows/Linux) and send a test message.