GitHub Copilot
GitHub Copilot
Section titled “GitHub Copilot”GitHub Copilot is integrated in Ptah via OAuth. If you already pay for Copilot, you can use its models inside Ptah at no additional API cost.
What you need
Section titled “What you need”- A GitHub account with an active Copilot subscription (Individual, Business, or Enterprise).
- Ptah Pro license, signed in.
Configuration
Section titled “Configuration”- Open Settings → Providers → GitHub Copilot.
- Click Sign in with GitHub. Your default browser opens to the GitHub OAuth consent page.
- Approve the Ptah app.
- The app returns to Ptah and stores the OAuth token in encrypted
safeStorage.
Non-secret Copilot settings live in ~/.ptah/settings.json:
{ "provider.github-copilot.tokenExchangeUrl": "", "provider.github-copilot.apiEndpoint": "", "provider.github-copilot.clientId": "", "provider.github-copilot.modelTier.opus": null, "provider.github-copilot.modelTier.sonnet": null, "provider.github-copilot.modelTier.haiku": null, "agentOrchestration.copilotModel": "", "agentOrchestration.copilotReasoningEffort": "", "agentOrchestration.copilotAutoApprove": true}Empty strings and null values mean “use Ptah’s defaults.” Override tokenExchangeUrl, apiEndpoint, and clientId only if you are on Copilot Enterprise with a custom endpoint — your admin will supply the values.
The modelTier.* fields let you pin which upstream Copilot model is used when Ptah’s sub-agent orchestrator asks for an Opus/Sonnet/Haiku-tier model.
Verifying it works
Section titled “Verifying it works”- Open the chat.
- Pick any Copilot model in the selector.
- Send a prompt. You should get a streaming response with a $0 cost (your Copilot subscription covers the tokens).
Troubleshooting
Section titled “Troubleshooting”- OAuth window closes without returning — check that your browser isn’t blocking the
http://localhostcallback. Try a different browser. 403 Forbidden— your Copilot plan doesn’t include the model you picked. Choose a different Copilot model.401 Unauthorizedafter working for a while — the OAuth token expired. Click Sign out then sign in again from Settings.- Enterprise “unknown endpoint” — ask your Copilot admin for
tokenExchangeUrl,apiEndpoint, andclientIdvalues and paste them into~/.ptah/settings.json.