Use GitHub Copilot as the model backend without provisioning an Azure model deployment.
- A GitHub account with Copilot access
- The GitHub CLI for local authentication
The NuGet package includes the Copilot CLI runtime used by the SDK. You do not need to install it separately.
For local development, sign in with GitHub CLI:
gh auth login
gh auth statusThe SDK checks COPILOT_GITHUB_TOKEN, GH_TOKEN, stored Copilot credentials, and GitHub CLI credentials. The application does not require a token in appsettings.json.
For automation or deployment, set COPILOT_GITHUB_TOKEN. You can also store GitHubCopilot:Token in AppHost user secrets:
dotnet user-secrets --file ./apphost.cs set GitHubCopilot:Token "{{GITHUB_TOKEN}}"Explicit tokens take precedence over ambient credentials. Classic personal access tokens with the ghp_ prefix are not supported. Use a fine-grained github_pat_ token, an OAuth user token, or a GitHub App user token.
Note
aspire start --isolated uses an isolated user-secrets scope. Prefer GitHub CLI authentication for isolated runs, or set the token in that isolated AppHost instance.
The app defaults to gpt-5-mini. To request a different model, update apphost.settings.json:
{
"GitHubCopilot": {
"Model": "gpt-5-mini"
}
}Model availability depends on the Copilot plan and organization policy. Use CopilotClient.ListModelsAsync() when you need to discover the models available to the authenticated account.
401 Bad credentials means an explicit token was rejected. Check or remove the configured AppHost secret so the SDK can use GitHub CLI authentication:
dotnet user-secrets --file ./apphost.cs list
dotnet user-secrets --file ./apphost.cs remove GitHubCopilot:Token
gh auth statusDo not leave template values such as {{GITHUB_PAT}} in configuration.
GitHub Copilot supports both agent modes:
# Multi-agent workflow
aspire start --apphost ./apphost.cs -- --provider GitHubCopilot --mode HandOff
# Single-agent workflow
aspire start --apphost ./apphost.cs -- --provider GitHubCopilot --mode SingleFor the project-based AppHost:
aspire start --apphost ./src/InterviewCoach.AppHost -- --provider GitHubCopilot --mode HandOffThe SDK runs in empty mode. Copilot receives the interview instructions and the MCP tools assigned to each agent, but it does not receive Copilot CLI's built-in shell, filesystem, or coding tools.
Requests count against the authenticated account's Copilot usage. See GitHub Copilot plans for current limits.