Skip to content
agentgateway has joined the Agentic AI Foundation — Learn more

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

Page as Markdown

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

  1. Install the agentgateway binary.
  2. Install VS Code with the GitHub Copilot extension.
  3. Have a GitHub Copilot Business or Enterprise subscription.

Tip

If you manage models and virtual API keys in the standalone 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

You can configure agentgateway in the UI or in your configuration file.

To create the same configuration in the UI, follow these steps.

  1. Set your OpenAI API key, create a configuration file with an empty llm section, and start agentgateway. The UI checks that the OPENAI_API_KEY environment variable exists when you save the model.

    export OPENAI_API_KEY='<your-api-key>'
    cat > config.yaml <<'EOF'
    llm:
      models: []
    EOF
    agentgateway -f config.yaml
  2. Add the model.

    1. Open LLM > Models, such as http://localhost:15000/ui/llm/models, and click Add model.

    2. From the Provider dropdown, select OpenAI.

    3. In the Incoming model match field, replace the default openai/* with *.

    4. For the Provider API key, select Env var, and enter OPENAI_API_KEY.

      Add model drawer with the OpenAI provider, * as the incoming model match, and the provider API key read from the OPENAI_API_KEY environment variable
      Add model drawer with the OpenAI provider, * as the incoming model match, and the provider API key read from the OPENAI_API_KEY environment variable
    5. Click Save model.

  3. Serve LLM traffic on port 3000.

    1. Open the Gateway Overview page, such as http://localhost:15000/ui/.

    2. On the LLM row, click Settings.

    3. Enter 3000 for the Port, and click Save settings.

      LLM Settings drawer with the Gateway binding port set to 3000 and a Save settings button
      LLM Settings drawer with the Gateway binding port set to 3000 and a Save settings button

The UI writes the same deprecated llm.port field as the Config file tab, plus an empty llm.gateways list. If your configuration defines gateways, the Settings drawer shows a Gateway dropdown instead of Port, and binds LLM traffic to the gateway that you select. The UI also writes the provider as openai instead of openAI. Agentgateway accepts both values.

Whether the UI can save depends on your storage mode. For more information, see Save changes from the UI.

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://localhost:3000/v1"
      }
    }
  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 (Cmd + Shift + I on macOS, Ctrl + Shift + I on Windows/Linux) and send a test message.
Was this page helpful?
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/.