Text of docs.docker.com › ai › docker-agent › providers › github-copilot as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

GitHub Copilot | Docker Docs

Start a new chat Answers are generated based on the documentation. Manuals Get started Guides Reference GitHub Copilot Table of contents Use GitHub Copilot's hosted models with Docker Agent through your existing GitHub subscription. Overview GitHub Copilot exposes an OpenAI-compatible Chat Completions API at https://api.githubcopilot.com . Docker Agent ships with built-in support for it as the github-copilot provider, so any user with a paid GitHub Copilot subscription can reuse their entitlement from Docker Agent.

Prerequisites An active GitHub Copilot subscription (Individual, Business, or Enterprise). A personal access token with the copilot scope, exported as GITHUB_TOKEN or GH_TOKEN . If both are set, GITHUB_TOKEN takes precedence. export GITHUB_TOKEN = "ghp_..." Running Evals Eval cases ( docker agent eval ) run in isolated containers. Unlike dedicated provider API keys, GITHUB_TOKEN and GH_TOKEN are not forwarded into eval containers automatically, because a GitHub token grants far broader access than a model API key.

Pass the token explicitly: docker agent eval agent.yaml ./evals -e GITHUB_TOKEN See Evaluation for details, including behavior with --env-from-file . Configuration Inline agents : root : model : github-copilot/gpt-5.6-sol instruction : You are a helpful assistant. Named model models : copilot : provider : github-copilot model : gpt-5.6-sol temperature : 0.7 max_tokens : 4000 agents : root : model : copilot Available Models The exact set of models you can call depends on your Copilot plan.

The most commonly available ones today are: Model Best For gpt-5.6-sol Multimodal, balanced performance gpt-5.6-terra Fast and cheap claude-sonnet-5 Strong coding and analysis gemini-3.5-flash Google's model, large context grok-4.5 xAI's reasoning-focused model Check the GitHub Copilot documentation for the current model list. Copilot-Integration-Id Header GitHub's Copilot API rejects requests that don't carry a Copilot-Integration-Id header with a Bad Request error.

Docker Agent automatically sends copilot-developer-cli for the github-copilot provider, so PAT-based usage works out of the box. We specifically chose copilot-developer-cli (instead of, say, vscode-chat ) because it is the integration id accepted by the Copilot API for both OAuth tokens and Personal Access Tokens. Most Docker Agent users authenticate with a PAT exported as GITHUB_TOKEN , and vscode-chat is rejected for those tokens.

If you need to send a different integration id — for example if your organization allows-lists a specific value — you can override it via provider_opts.http_headers : models : copilot : provider : github-copilot model : gpt-5.6-sol provider_opts : http_headers : Copilot-Integration-Id : my-custom-integration Header names are matched case-insensitively, so copilot-integration-id works too. Chat Completions vs. Responses API GitHub Copilot proxies OpenAI models behind two endpoints: the legacy /chat/completions and the newer /responses .

Newer models (the gpt-5 family, Codex variants, etc.) are only served via /responses and reject /chat/completions with a 400 Bad Request . Docker Agent auto-selects the right endpoint per model, so no configuration is needed in the common case. If you ever need to force one or the other, set api_type explicitly: models : copilot : provider : github-copilot model : gpt-5.6-sol provider_opts : api_type : openai_responses # or openai_chatcompletions Custom HTTP Headers provider_opts.http_headers is a generic escape hatch that works for any OpenAI-compatible provider, not just GitHub Copilot.

Every key/value pair is added to every outgoing request: models : my_model : provider : openai model : gpt-5.6-sol provider_opts : http_headers : X-Request-Source : docker-agent X-Tenant-Id : my-team How It Works GitHub Copilot is implemented as a built-in alias in Docker Agent: API type: OpenAI-compatible; automatically selects Chat Completions or Responses by model Base URL: https://api.githubcopilot.com Token variables: GITHUB_TOKEN , falling back to GH_TOKEN Default headers: Copilot-Integration-Id: copilot-developer-cli This means the same client as OpenAI is used, so every OpenAI feature supported by Docker Agent (tool calling, structured output, multimodal inputs, etc.) is available when the underlying model supports it.