Skip to main content
GitHub Copilot is an AI pair programmer. Route Copilot through Portkey to get:
  • 1600+ LLMs — Use any model, not just Copilot’s defaults
  • Observability — Track costs, tokens, latency
  • Governance — Budget limits, rate limits, RBAC
  • Guardrails — PII detection, content filtering
Experimental integration. Only GitHub Copilot Chat works with Portkey. Advanced Copilot features are not available yet.

1. Setup Portkey

1

Add Provider

Go to Model CatalogAdd Provider.
2

Configure Credentials

Select your provider (OpenAI, Anthropic, etc.), enter your API key, and create a slug like openai-prod.
3

Copy Model Slug

Go to Model CatalogModels → Copy the slug (e.g., @openai-prod/gpt-4o).
4

Create Config

Go to Configs and create:
{
  "override_params": {
    "model": "@openai-prod/gpt-4o"
  }
}
Save and note the Config ID.
5

Get Portkey API Key

Go to API Keys → Create new key → Attach your config → Save.

2. Configure GitHub Copilot

1

Open Manage Models

In Copilot chat, click the model dropdownManage Models.
2

Add Custom Model via Azure

  1. Select Azure → Click gear iconConfigure modelsAdd a new model
  2. Fill in:
    • Identifier: portkey-model
    • Display name: Custom Portkey Model
    • API endpoint URL: https://api.portkey.ai/v1/chat/completions
    • Capabilities: Enable Tools, Vision, Thinking as needed
    • Token limits: Set based on your model
3

Add API Key

  1. From Manage Models → Select Azure → Select your model
  2. In API Keys, paste your Portkey API Key
  3. Save
Done! Your Copilot requests now route through Portkey with observability and controls.

Features

Observability

Track 40+ metrics: cost, tokens, latency, performance.

Logs

Complete request/response tracking with metadata and cost attribution.

Reliability

Guardrails

Protect code with real-time checks:
  • Prevent API key leaks
  • PII detection in generated code
  • Content filtering
  • Custom security rules

Guardrails

Configure input/output protection

FAQs

Use https://api.portkey.ai/v1/chat/completions for chat completions.
Attach a default config to the API key and optionally disable overrides. See Enforcing Default Configs.
Issue separate API keys or use metadata. Monitor in the analytics dashboard.

Next Steps

Community: Discord · GitHub