GitHub Models was permanently retired on July 30, 2026. Checked on 28 Nov 2026, official GitHub docs confirm the playground, catalog, models.github.ai inference API and BYOK endpoints are permanently offline. Below is what shut down and the exact drop-in swap to move your OpenAI SDK to an active free provider.
§ 01 · RETIREMENTWHAT SHUT DOWN ON JULY 30, 2026CHECKED 28 NOV 2026
Service Discontinued (28 Nov 2026): GitHub Models was fully retired on July 30, 2026; the inference API is no longer available.
What Was Retired on July 30, 2026
GitHub permanently decommissioned the standalone GitHub Models service — including the browser playground, hosted model catalog, models.github.ai/inference API and BYOK routing. Any tutorial, GitHub Action or student app still authenticating with GITHUB_TOKEN against models.github.ai now fails permanently.
2026-07-30 (No Longer Free): GitHub Models was fully retired on July 30, 2026; the inference API is no longer available. View change log.
Because GitHub Models implemented the standard OpenAI Chat Completions schema, you do not need to rewrite prompt templates, streaming parsers or tool definitions. Replace models.github.ai/inference and GITHUB_TOKEN using the mapping table below:
Migration mapping from retired GitHub Models to verified active free LLM APIs
import os
from openai import OpenAI
# Before (retired July 30, 2026):
# client = OpenAI(base_url="https://models.github.ai/inference", api_key=os.environ["GITHUB_TOKEN"])
# After (verified free — 30 RPM, 1,000 RPD, no card):
client = OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key=os.environ["GROQ_API_KEY"],
)
res = client.chat.completions.create(
model="openai/gpt-oss-20b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(res.choices[0].message.content)
import os
from openai import OpenAI
# Verified free — per-model limits, vision & long context, no card:
client = OpenAI(
base_url="https://generativelanguage.googleapis.com/v1beta/openai",
api_key=os.environ["GEMINI_API_KEY"],
)
res = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Hello!"}],
)
print(res.choices[0].message.content)
§ 03 · PICKING A REPLACEMENTBY WORKLOADNO CREDIT CARD
Best Free Replacements by Workload
Closest speed & daily volume — Groq gives 1,000 requests/day on openai/gpt-oss-20b with no credit card.
Closest multi-model catalog — OpenRouter :free puts dozens of open models behind one key (50 RPD free, 1,000 RPD after buying 10 credits).
Vision & long context — Google AI Studio covers multimodal prompts and embeddings free with no card.
§ FAQCOMMON QUESTIONSANSWERS
GitHub Models Retirement Questions
Is GitHub Models Still Free?
No. GitHub permanently retired GitHub Models on July 30, 2026 — both the free playground and the models.github.ai inference API are shut down.
Why Did My GitHub Models Token Stop Working?
GitHub decommissioned the entire models.github.ai inference service on July 30, 2026 for all personal and organization tokens.
Where Should I Migrate From GitHub Models?
Swap base_url and your key to Groq (1,000 RPD), OpenRouter :free (50 RPD), Google AI Studio or Cloudflare Workers AI — all four work with the OpenAI SDK and no credit card.
Does GitHub Copilot Include a Standalone Free Inference API?
No. GitHub directs API workloads to paid Azure AI Foundry deployments rather than a standalone free inference API.