GitHub Models Is Retired: What to Use Instead (2026)

⚠️ Retired: GitHub Models was fully retired on July 30, 2026. Per GitHub's own docs, the playground, model catalog, inference API and bring-your-own-key access are all gone for every customer. This page is a migration guide, not a setup guide. See our benchmark of the free AI APIs still running for measured replacements.
Quick answer: GitHub Models no longer exists. It closed to new customers in June 2026, ran scheduled brownouts on July 16 and July 23, and shut down completely on July 30, 2026. Microsoft's official migration path is Microsoft Foundry Models, which is paid. If what you wanted was a free OpenAI-compatible endpoint, the closest replacements today are Groq, OpenRouter and Cloudflare Workers AI — none of which carry GPT-4o.

What the Endpoint Returns Today

The inference host still resolves, which is why some applications fail with a parseable error rather than a connection failure. You can check it yourself with no token:

curl -i https://models.github.ai/catalog/models

As of 2026-08-28 that returns HTTP 410 Gone with this body:

{"error":{"code":"github_models_retirement_brownout",
          "message":"GitHub Models is temporarily unavailable as part of a scheduled retirement brownout."}}

We re-checked on 2026-08-31 through our automated benchmark, which calls the inference endpoint with a real token: same 410, same body. The word "temporarily" is misleading a month after the shutdown — the retirement is permanent. If you have monitoring that treats any JSON response as success, this is the shape of failure to watch for: a 410 with a valid body, not a timeout.

Timeline

DateWhat happened
June 2026Closed to new customers
2026-07-16First scheduled brownout
2026-07-23Second scheduled brownout
2026-07-30Full retirement — playground, catalog, inference API and BYOK all disabled

Where to Go Instead

There is the migration Microsoft wants you to make, and there is the migration you probably want if you used GitHub Models because it was free.

If you need the same models (paid)

Microsoft Foundry Models is the official successor and carries the same OpenAI, Meta, Mistral, Cohere and AI21 catalog behind an Azure subscription. It is production-grade and it is not free. This is the right path if GitHub Models was serving real traffic.

If you need free and OpenAI-compatible

No free tier anywhere still hands out GPT-4o. That was the unusual thing about GitHub Models, and it is the part with no replacement. What you can get for $0 today, each figure taken from the provider's own docs on 2026-08-28:

ProviderFree modelsFree limitsCard required
Groqgpt-oss-120b, gpt-oss-20b, qwen3.6-27b30 RPM, 1,000 RPD, 8K TPM, 200K TPDNo
OpenRouter21 free models incl. GLM 5.2, Nemotron 320 RPM, 50 RPD — 1,000 RPD after a one-time $10 purchaseNo
Cloudflare Workers AIOpen-weight catalogDaily neuron allocationNo
NVIDIA NIM102 models in the public catalogCredit-basedNo

Migrating the Code

GitHub Models was OpenAI-compatible, so in most cases the migration is two lines. The old setup:

from openai import OpenAI

client = OpenAI(
    base_url="https://models.inference.ai.azure.com",   # dead
    api_key=os.environ["GITHUB_TOKEN"],
)
resp = client.chat.completions.create(model="gpt-4o", messages=[...])

The same code pointed at Groq's free tier:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.groq.com/openai/v1",
    api_key=os.environ["GROQ_API_KEY"],
)
resp = client.chat.completions.create(
    model="openai/gpt-oss-120b",
    messages=[{"role": "user", "content": "Summarise this changelog."}],
)
print(resp.choices[0].message.content)

The request and response shapes are identical. What changes is the model string and the ceiling: Groq's free plan allows 1,000 requests a day but only 200,000 tokens a day, so a 2,000-token exchange exhausts the day at around 100 calls — well before the request cap.

If You Were Using It in CI

The most common GitHub Models pattern was a workflow that called the API with the built-in GITHUB_TOKEN — no secret to manage, because the token was already there. Nothing replaces that convenience: every alternative needs a real API key stored as a repository secret.

Worth auditing your workflows for the old base URL. A 410 with a JSON body can look like a successful call to a script that only checks whether parsing succeeded.

Frequently Asked Questions

Is GitHub Models really gone, or just paused?

Gone. GitHub's documentation states it was fully retired on July 30, 2026. The "temporarily unavailable" wording still returned by the endpoint is leftover brownout copy, not a signal that it is coming back.

Can I still get free GPT-4o anywhere?

Not through a free API tier. GitHub Models was the outlier in offering frontier closed models at no cost. Free tiers today are open-weight models — gpt-oss, Qwen, GLM, Nemotron, Llama — served by providers such as Groq, OpenRouter and Cloudflare.

What is the official replacement?

Microsoft Foundry Models. It carries the same catalog and is the path Microsoft documents, but it runs on an Azure subscription rather than a free GitHub account.

My app still "works" — why?

Check what it is actually receiving. The endpoint answers with HTTP 410 and a well-formed JSON error object, so code that catches exceptions but never checks the status code can silently treat the failure as an empty result.

Final Thoughts

GitHub Models was the easiest free AI API to start with, precisely because it needed nothing — no signup, no card, and a token you already had. That combination is not available anywhere now. The nearest thing in 2026 is Groq's free plan: no card, an OpenAI-compatible endpoint, and open-weight models fast enough for real use — provided you size your usage against a 200,000-token daily budget rather than a request count.

Related Reading