GitHub Models Retires July 30: Find the Calls, Then Drop the PAT
GitHub Models shuts down on July 30, with brownouts on July 16 and 23, while Copilot CLI now runs in Actions on GITHUB_TOKEN. What to audit, migrate and cap.
Umut Korkmaz
Published: 4 min read
On this page6
GitHub shipped two changelog entries this week that belong together. On July 1 it set the date for GitHub Models to be fully retired: July 30, 2026. A day later it announced that Copilot CLI can now run in GitHub Actions with the built-in GITHUB_TOKEN, with no personal access token. One closes a door that a lot of small AI automations quietly walked through. The other opens a cleaner one. If anything you run still calls GitHub Models, you have less than two weeks before the first scheduled outage.
What is going away, and when
GitHub announced the retirement in June and closed Models to new customers then. The July 1 entry sets the timeline for the next step, and this one applies to everyone, including existing customers with active usage. After July 30, the playground, the model catalog, the inference API and the bring-your-own-key (BYOK) endpoints are no longer available, and the related UI is removed.
Before that come two brownouts, on July 16 and July 23, when Models requests temporarily return errors before service is restored. For where to go next, GitHub points to Microsoft Foundry if you need a broad model catalog, and to GitHub Copilot if you want to build AI-powered workflows directly on GitHub.
Treat the brownouts as a free rehearsal. If something breaks on the 16th, you have found the dependency with two weeks to spare instead of none.
Find the calls before the brownouts do
GitHub Models was easy to adopt, which is why it hides. Last August GitHub's own blog showed how to use Models from Actions with actions/ai-inference@v1 and a single models: read line in the permissions block.
What I would put on a team's list for Monday:
- Search every repo's
.github/workflowsforactions/ai-inferenceandmodels: read. - Search scripts and developer tooling for the
gh modelsCLI extension. - Find out who set up BYOK in Models. That path goes away too.
- Check application code, not only CI; a playground prototype can end up calling the inference API from a real service.
- For each hit, name an owner and a decision: move it to Foundry, move it to Copilot, move it to a provider you already pay for, or delete it.
The good half: no PAT for Copilot CLI in CI
The July 2 change is the one I am glad about. Running Copilot CLI in a workflow used to mean creating a personal access token and storing it as a secret. GitHub frames the new path as removing "the operational and security risks of managing long-lived PATs" for automation at scale, and I agree. A long-lived token tied to one person, sitting in repo secrets, is the part of AI automation I trust least. When I think about putting Quorate, my CLI that runs AI reviewers over a diff, into a pipeline, the review logic is easy to reason about. The standing credential is not.
The setup is small. An organization enables the "Allow use of Copilot CLI billed to the organization" Copilot policy, which is on by default if the existing "Copilot CLI" policy is enabled. The workflow then needs the copilot-requests: write permission and authenticates with its own GITHUB_TOKEN, no extra secrets. The example workflow in the docs on using Copilot CLI in Actions with GITHUB_TOKEN pairs it with read-only contents:
permissions:
contents: read
copilot-requests: write
You also need a recent CLI: update with copilot update or reinstall with npm install -g @github/copilot. If you pin the CLI version in CI, bump it before you switch auth.
One thing does not change. An agent inside your workflow can still reach whatever that job can reach. The same docs page warns that calling the CLI directly in workflow steps gives it broad access to the workflow environment, and that workflows triggered by pull requests from forks are particularly at risk. For most automation it recommends GitHub Agentic Workflows, which add guardrails for automated environments. Keep permissions tight and watch which triggers can feed the agent untrusted input; a short-lived token does not fix that. It is also the part that lines up most with the CEH (AI) material I am working through.
Billing moves to the organization
In organization-owned repos, AI credits the CLI consumes are billed to the organization. The changelog is explicit that user-level budgets are not considered in this mode, because the cost is not attributed to a user. Per-developer budgets will not catch a runaway workflow.
GitHub lists three controls: cost centers, which can carry budgets; the organization's billing and usage dashboards; and a session limit that sets a maximum amount of AI credits a workflow can use. I would treat the session limit as mandatory for any workflow triggered by events you do not control, and set it before the first run, not after the first surprising bill.
My take
Read together, the two announcements show GitHub folding its AI surface into Copilot. Inventory the Models calls this week. Let July 16 confirm you found them all. When you move CI automation to Copilot CLI, use the GITHUB_TOKEN path with a session limit instead of rebuilding the PAT pattern. Then revoke the old tokens, because that is the step that usually gets skipped.
Sources
Primary references used for this post.
- github.blog/changelog/2026-07-01-github-models-is-being-fully-retired-on-july-30-2026 (opens in a new tab)
- github.blog/changelog/2026-07-02-copilot-cli-no-longer-needs-a-personal-access-token-in-github-actions (opens in a new tab)
- docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli-in-actions (opens in a new tab)
- github.blog/ai-and-ml/generative-ai/automate-your-project-with-github-models-in-actions (opens in a new tab)