GitHub Models Rate Limits: How They Scale Across Copilot Subscription Tiers

GitHub Models rate limits scale proportionally with your Copilot subscription tier, ranging from 5–10 requests per minute (RPM) and 100,000 daily tokens on the Free plan up to 60+ RPM and 5,000,000+ tokens for Enterprise customers.

The cheahjs/free-llm-api-resources repository tracks free and trial-based LLM API providers, including detailed references to how GitHub Models enforces tier-based rate limits. According to the documentation cited in README.md at lines 206–207, these limits are defined by GitHub’s official Prototyping with AI models guide and vary significantly based on whether you hold a Free, Pro, Pro+, Business, or Enterprise Copilot subscription.

How GitHub Models Rate Limits Scale by Copilot Tier

All Copilot tiers access the same endpoint at https://models.github.com/v1/, but GitHub applies distinct rate ceilings and token quotas depending on your subscription level. The repository’s src/pull_available_models.py file (line 886) embeds these tier distinctions when generating documentation tables.

Copilot Tier Typical RPM Limit Typical Daily Token Quota
Free 5 – 10 RPM 100,000 tokens
Pro 10 – 20 RPM 250,000 tokens
Pro+ 20 – 30 RPM 500,000 tokens
Business 30 – 60 RPM 1,000,000 tokens
Enterprise 60+ RPM (customizable) 5,000,000+ tokens (negotiated)

Exact values are subject to change per model and are enforced collectively across all models requested under a single subscription. Enterprise customers may negotiate custom limits with GitHub Sales that exceed these baseline figures.

Key Implementation Details from the Source Code

The cheahjs/free-llm-api-resources repository references GitHub’s rate-limiting behavior in two critical locations. In README.md at lines 206–207, the documentation links directly to GitHub’s official rate limit specifications. Meanwhile, src/pull_available_models.py at line 886 injects tier-specific rate limit metadata when regenerating the provider comparison tables.

Per-account enforcement means all requests across different models count against the same quota. Hitting the limit returns HTTP 429 with a Retry-After header indicating the required wait time before subsequent requests succeed.

Handling Rate Limits in Production Code

When building applications against GitHub Models, implement retry logic and client-side throttling that respects your specific tier’s RPM ceiling.

Automatic Retry on 429 Responses

This Python implementation polls the Retry-After header when encountering rate limits:

import time
import requests
import os

API_URL = "https://models.github.com/v1/completions"
HEADERS = {
    "Authorization": f"Bearer {os.getenv('GITHUB_COPILOT_TOKEN')}",
    "Content-Type": "application/json",
    "OpenAI-Organization": "github-copilot"
}

payload = {
    "model": "gpt-4o-mini",
    "prompt": "Write a polite thank-you email.",
    "max_tokens": 200
}

def call_github_model():
    while True:
        r = requests.post(API_URL, json=payload, headers=HEADERS)
        if r.status_code == 429:
            retry_after = int(r.headers.get("Retry-After", "5"))
            print(f"Rate limited – retrying after {retry_after}s")
            time.sleep(retry_after)
            continue
        r.raise_for_status()
        return r.json()

print(call_github_model())

The loop automatically respects the Retry-After header, which GitHub sets according to the tier-specific limit.

Tier-Aware Request Throttling

For batch processing, calculate delay intervals based on your subscription tier to stay below RPM thresholds:

import itertools
import time
import requests
import os

RPM_BY_TIER = {
    "free": 7,
    "pro": 15,
    "pro_plus": 25,
    "business": 45,
    "enterprise": 120,
}

CURRENT_TIER = os.getenv("COPILOT_TIER", "free")
DELAY = 60.0 / RPM_BY_TIER[CURRENT_TIER]

def batch_generate(prompts):
    results = []
    for prompt in prompts:
        payload = {
            "model": "gpt-4o-mini",
            "prompt": prompt,
            "max_tokens": 150
        }
        r = requests.post(
            "https://models.github.com/v1/completions",
            json=payload,
            headers={"Authorization": f"Bearer {os.getenv('GITHUB_COPILOT_TOKEN')}"}
        )
        r.raise_for_status()
        results.append(r.json())
        time.sleep(DELAY)
    return results

sample_prompts = ["Summarize this article.", "Translate to French."]
print(batch_generate(sample_prompts))

Adjust RPM_BY_TIER based on your subscription to remain comfortably below the hard limit.

Summary

  • GitHub Models rate limits scale linearly with Copilot subscription tiers, from 5–10 RPM on Free plans to 60+ RPM on Enterprise contracts.
  • Daily token quotas range from 100,000 tokens (Free) to 5,000,000+ tokens (Enterprise).
  • Rate limiting is account-wide and applies across all models accessed through https://models.github.com/v1/.
  • HTTP 429 responses include a Retry-After header that indicates when to retry failed requests.
  • Enterprise customers can negotiate custom limits beyond the standard tier boundaries.

Frequently Asked Questions

What happens when I exceed my GitHub Models rate limit?

The API returns an HTTP 429 Too Many Requests status code with a Retry-After header specifying the number of seconds to wait before the next request. Your application must handle these responses to avoid hard failures during high-volume operations.

Can I upgrade my rate limits without changing my Copilot subscription tier?

No. GitHub Models rate limits are strictly tied to your Copilot subscription tier. To access higher RPM ceilings or larger daily token quotas, you must upgrade from Free to Pro, Pro+, Business, or Enterprise tiers, or negotiate custom Enterprise agreements with GitHub Sales.

Do GitHub Models rate limits apply per model or per account?

Limits apply per account, not per model. All requests made with your Copilot API token count against a single shared quota, regardless of which specific model (GPT-4o, Claude, etc.) you are calling through the GitHub Models endpoint.

Where are the official rate limit values documented?

Authoritative, up-to-date values are maintained in GitHub’s official documentation under the Rate limits section of the Prototyping with AI models guide, as referenced in README.md lines 206–207 of the cheahjs/free-llm-api-resources repository. Always consult the live documentation, as these limits are subject to change without notice.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →