AI & Agents

GitHub Models Rate Limits: Free Tier Quotas, Token Limits, and MCP File Retrieval

GitHub Models rate limits restrict free prototyping API requests to fixed per-minute and per-day caps to ensure equitable access across developer accounts. When developer agents stuff raw project files and context into model prompts, they quickly trigger HTTP 429 rate limit errors and exhaust daily quotas. Decoupling file storage from inference by retrieving documents through remote Model Context Protocol (MCP) servers preserves token allowances and stabilizes automated pipelines.

Tom Langridge 12 min read Updated
Offloading file storage to indexed workspaces prevents token exhaustion and 429 rate limit errors on AI model endpoints.

What Are the Documented Rate Limits for GitHub Models?

Automated workflows fail the moment a developer treats a free prototyping playground as an unmetered inference backend. According to GitHub documentation, GitHub Models rate limits restrict free prototyping API requests to fixed per-minute and per-day caps to maintain equitable access across developer accounts. Built as an experimentation environment for developers to test prompts and compare model behaviors across providers like OpenAI, Meta, Mistral, and Cohere, the service enforces strict boundaries on frequency, daily volume, input payload sizes, and concurrent connections.

Understanding how GitHub structures these thresholds is necessary before connecting model endpoints to background workers, continuous integration scripts, or terminal agents. The platform evaluates traffic against four separate operational metrics:

  • Requests Per Minute (RPM). A rolling 60-second window that meters request frequency to protect backend infrastructure from request bursts.
  • Requests Per Day (RPD). A cumulative 24-hour ceiling tracked on a per-user, per-model basis (UserByModelByDay). Once reached, the user cannot call that specific model again until the allocation window resets.
  • Tokens Per Request (TPR). Maximum allowable input and output token volumes permitted in a single completion call, restricting prompt payload sizes.
  • Concurrent Requests. The maximum number of simultaneous API connections allowed to be open at any single millisecond.

The table below outlines the standard rate limits enforced across GitHub Models catalog tiers during prototyping:

Model Catalog Tier Requests Per Minute (RPM) Requests Per Day (RPD) Input Token Ceiling Output Token Ceiling Concurrent Call Limit
Low-Tier Models (e.g., Mistral Small, Llama 3.1 8B) 15 RPM 150 RPD 8,000 tokens 4,000 tokens 5 concurrent
High-Tier Models (e.g., GPT-4o, reasoning models) 10 to 15 RPM 50 to 150 RPD 8,000 tokens 4,000 tokens 2 concurrent
Embedding Models (e.g., text-embedding-3-small) 15 RPM 150 RPD 8,000 tokens N/A 5 concurrent

As of July 30, 2026, GitHub Models has been fully retired and its inference API is no longer available to any customer. Developers who built prototypes against those endpoints must migrate production-bound applications to Azure AI Foundry or build directly on GitHub Copilot. The quota architectures pioneered in GitHub Models continue to govern modern model gateways, making it critical to understand how request frequency caps, token boundaries, and payload limits interact.

Request Frequency Ceilings: RPM, RPD, and Sliding Windows

The dual restriction of short-term RPM and daily RPD ceilings creates specific operational challenges for automated software agents. A simple loop that fires four requests in two seconds to summarize different code files can easily trip the concurrency ceiling or the per-minute quota. Even if an agent spaces its requests evenly to stay beneath 15 RPM, running periodic background jobs will consume the daily allocation of 50 to 150 requests within a single morning.

Daily limits run on a sliding 86,400-second window or reset at UTC midnight depending on the underlying endpoint infrastructure. Because the limit applies per model, exhausting your allowance on a high-tier model like GPT-4o blocks further requests to that model while leaving allocations for smaller models intact.

Context Window Disconnect: Architectural Max Versus Enforced Input Caps

A frequent source of developer confusion is the gap between a foundation model's theoretical context window and the input caps enforced by prototyping endpoints. For example, while GPT-4o natively supports a context window of 128,000 tokens, the free prototyping tier on GitHub Models enforced an input ceiling of 8,000 tokens.

Developers attempting to paste whole codebases, multi-page technical documentation, or extensive API specifications into prompt payloads receive immediate payload validation errors. Attempting to bypass this constraint by slicing files across multiple rapid API calls rapidly drains the 50 to 150 daily request quota, halting the entire workflow.

How HTTP 429 Errors and Rate Limit Response Headers Operate

When an application breaches any configured rate limit on a model gateway, the server immediately rejects the request with an HTTP 429 Too Many Requests status code. Understanding the structure of these errors prevents developers from wasting hours debugging prompt logic when the real issue is rate throttling.

Many technical articles confuse GitHub Copilot with GitHub Models, assuming that an active GitHub Copilot subscription increases GitHub Models API throughput. GitHub Copilot is a seat-based developer assistant providing in-editor completions, IDE chat, and agent execution. GitHub Models operated as a distinct model inference catalog with separate rate allocations. A Copilot subscription provides no quota relief or rate limit exemption on raw model inference endpoints.

When GitHub Models triggered a rate limit, the API returned a structured JSON payload defining the violated constraint:

{
  "error": {
    "code": "RateLimitReached",
    "message": "Rate limit of 50 per 86400s exceeded for UserByModelByDay. Please wait 19704 seconds before retrying.",
    "details": "Rate limit of 50 per 86400s exceeded for UserByModelByDay. Please wait 19704 seconds before retrying."
  }
}

To assist clients in managing call pacing, the API supplies diagnostic telemetry in standard HTTP response headers with every request:

  • x-ratelimit-remaining-requests: The number of requests remaining in the current one-minute sliding window.
  • x-ratelimit-remaining-tokens: The token allowance remaining in the active minute window.
  • x-ratelimit-reset-requests: The number of seconds remaining until the request counter resets.
  • x-ratelimit-reset-tokens: The number of seconds remaining until the token pool replenishes.
  • x-ratelimit-type: Identifies which boundary triggered throttling, such as minute frequency or UserByModelByDay.
  • retry-after: The integer duration in seconds that the client must pause before attempting another call.

Inspecting these response headers allows automated applications to adjust their request cadence dynamically rather than crashing on an unexpected HTTP 429.

Fastio features

Protect AI Model Quotas with Fast.io Workspaces

Stop burning through model rate limits and token caps by pasting files into prompts. Keep your team's code, specifications, and documentation in an intelligent Fast.io workspace where agents search indexed content through remote MCP. Monthly plans start with a 14-day free trial that requires a credit card.

Why Stuffing Files into Model Context Triggers Quota Exhaustion

The primary reason software teams run into model rate limits during prototyping is context stuffing. When building coding assistants, document review bots, or automated issue triage agents, engineers often inject entire files directly into system prompts.

Pasting full files into prompts damages session economics in three distinct ways:

  1. Immediate Input Cap Rejection. A single 50 KB documentation file contains roughly twelve thousand tokens. Sending that file to an endpoint with an 8,000-token input ceiling triggers immediate HTTP 400 or 429 rejections before processing begins.
  2. Rapid Token Quota Depletion. If an endpoint permits larger payloads, sending complete files burns thousands of tokens on static reference text that remains unchanged across prompts.
  3. Severe Concurrency and Request Spikes. When agents attempt to circumvent token caps by reading files piece by piece across multiple API calls, they trigger the 10 to 15 RPM frequency ceiling within seconds.

Comparing file handling mechanics across development environments highlights why direct prompt injection fails at scale (for example, Anthropic's Claude file upload guidance documents a 20-file chat ceiling):

Environment or Tool File Handling Architecture Documented Size or File Count Cap Working Context Constraint
Claude Web Chat Direct In-Chat File Attachment 20 files per conversation, 500 MB per file Bounded by model context window
Claude Projects Project Knowledge Library Unlimited file count, 30 MB per file Must fit within project context window
GitHub Models API Raw Prompt Injection Hard input cap of 8,000 tokens Calls exceeding cap rejected immediately
GitHub Copilot Chat Local Workspace Reference Selective in-editor file reference (#file) Truncated by active prompt window
Fast.io Workspace Remote MCP Search and Indexing 25 GB to 100 GB per file by plan Zero tokens consumed until relevant chunk retrieved

Direct file injection forces the model to re-tokenize identical documentation, schemas, and source code on every single turn. The reliable alternative is to decouple file storage from model inference: keep reference files in an external workspace, index them for semantic search, and retrieve only the precise snippets needed to answer the immediate query.

How to Offload File Retrieval to Fast.io via Remote MCP

The Model Context Protocol (MCP) provides an open standard for connecting AI models to external data sources without stuffing full documents into model context. Instead of pasting an entire handbook, code repository, or technical specification into an API call, an agent connects to a remote MCP server that searches indexed documents and returns concise, relevant passages.

Fast.io workspaces serve as persistent, intelligent storage environments designed specifically for agentic teams. Rather than managing fragmented local directories or configuring complex custom vector databases, developers place team files directly into Fast.io. The platform supports direct uploads as well as scheduled or on-demand Cloud Sync with Google Drive, Dropbox, Box, and OneDrive.

When Intelligence Mode is enabled on a workspace, Fast.io automatically indexes files for hybrid search combining full-text keyword indexing, semantic meaning, and metadata filtering. AI assistants connect to Fast.io using remote MCP over Streamable HTTP, allowing models to query large corpora on demand.

Coding agents running in IDEs or terminals (including VS Code, GitHub Copilot agent mode, Cursor, Claude Code, Cline, and Devin Desktop) connect directly to the code endpoint:

{
  "servers": {
    "fastio": {
      "type": "http",
      "url": "https://mcp.fast.io/mcp/code"
    }
  }
}

General AI assistants and conversational runtimes connect through https://mcp.fast.io/mcp/tools. For step-by-step connection instructions, review the setup guide at https://mcp.fast.io/docs, and inspect tool descriptions in https://mcp.fast.io/skill.md.

By issuing targeted searches through MCP, an agent retrieves only the specific paragraphs or code blocks necessary for the task. A query that previously required injecting an entire reference file now consumes only a few hundred prompt tokens. This reduction keeps requests well beneath the 8,000-token input ceiling and conserves daily RPD allotments.

Fast.io workspaces include per-file version history, a detailed activity log of changes, and role-based permissions set per organization, workspace, and share. Monthly plans start with a 14-day free trial that requires a credit card. Review tier options on the Fast.io pricing page:

Plan Monthly Price Included Storage Included Seats Monthly AI Credits
Starter $9.99/mo 250 GB 3 seats 100,000 credits
Business $49.99/mo 5 TB 10 seats 600,000 credits
Enterprise $199.99/mo 25 TB 30 seats 3,000,000 credits

Explore how teams coordinate agents and documents together on Fast.io AI and Fast.io collaboration. Learn more about persistent agent storage patterns at storage for agents.

Steps to Build Resilient Pipelines Under Strict API Limits

Building durable agent pipelines that operate reliably under strict rate limits requires disciplined architectural patterns. Whether prototyping against hosted developer endpoints or running multi-agent workflows in staging, follow these practical steps to avoid unexpected downtime:

1. Implement Jittered Exponential Backoff

When receiving an HTTP 429 response, inspect the retry-after header. If the header is absent, apply exponential backoff with randomized jitter to prevent retry storms across concurrent workers:

import time
import random
import requests

def call_model_with_backoff(url, headers, payload, max_retries=5):
    for attempt in range(max_retries):
        response = requests.post(url, headers=headers, json=payload)
        if response.status_code == 200:
            return response.json()
        
        if response.status_code == 429:
            retry_after = response.headers.get("retry-after")
            if retry_after:
                sleep_time = int(retry_after)
            else:
                sleep_time = (2 ** attempt) + random.uniform(0.5, 1.5)
            time.sleep(sleep_time)
            continue
        
        response.raise_for_status()
    raise RuntimeError("Exceeded maximum retry attempts due to rate limits.")

2. Count Tokens Locally Before Sending Requests

Never rely on the remote endpoint to reject oversized prompts. Use a local tokenizer library to calculate prompt tokens before dispatching an API call. If a prompt exceeds the model ceiling, prune conversational history or summarize earlier turns before sending the request.

3. Route Heavy Context to External MCP Workspaces

Avoid passing static reference documents, test datasets, or full code files inside prompt strings. Store them in an indexed workspace and use remote MCP tools to pull targeted context into the prompt dynamically.

4. Implement Model Fallbacks for Daily Quotas

Because limits like UserByModelByDay apply to individual models, design your agent orchestration to degrade gracefully. If your primary reasoning model hits its 50 RPD quota, route subsequent non-critical tasks to a secondary utility model with available daily headroom.

5. Transition to Dedicated Endpoints for Production

Free prototyping endpoints are intended solely for testing and evaluation. When your application moves beyond local experimentation into daily team operations, migrate to dedicated cloud deployments like Azure AI Foundry where throughput scales with provisioned capacity.

Sources

References used to verify factual claims in this guide.

  1. 1 GitHub Docs: GitHub Models Accessed

    As of July 30, 2026, GitHub Models has been fully retired and its inference API is no longer available to any customer.

Frequently Asked Questions

What are the rate limits for GitHub Models?

GitHub Models rate limits enforce strict quotas during prototyping: low-tier models permit 15 requests per minute (RPM) and 150 requests per day (RPD) with 5 concurrent calls. High-tier models such as GPT-4o permit 10 to 15 RPM, 50 to 150 RPD, and 2 concurrent calls. Single-request input tokens are typically capped at 8,000 tokens.

Can I use GitHub Models in production applications?

No. GitHub Models was designed strictly for playground testing, prompt evaluation, and prototyping. Its daily quotas (50 to 150 requests per day) and per-minute throttling make it unsuitable for production workloads. High-volume applications should deploy models through Azure AI Foundry or direct model provider APIs.

How do I fix rate limit exceeded in GitHub Models?

When you receive an HTTP 429 error, check the retry-after and x-ratelimit-reset-requests response headers. If the error specifies UserByModelByDay, your daily quota for that specific model is exhausted until the 86,400-second window elapses. Implement exponential backoff, switch to an alternative model, or offload large context to an external MCP workspace.

Does GitHub Copilot increase GitHub Models rate limits?

No. GitHub Copilot and GitHub Models are managed as separate services. A paid GitHub Copilot Pro or Enterprise subscription provides coding assistance in your IDE but does not expand request quotas or token allowances on GitHub Models API endpoints.

Why does attaching large code files cause rate limit errors?

Raw file attachments consume thousands of input tokens per request. When file content approaches the 8,000-token input cap, requests are either rejected immediately or consume your per-minute token allocation, triggering HTTP 429 throttling on subsequent calls.

How does Fast.io MCP prevent rate limit exhaustion?

Fast.io indexes project files, documentation, and data in shared workspaces. Rather than injecting whole files into prompts, an AI assistant queries the workspace via remote MCP over Streamable HTTP, retrieving only relevant passages. This reduces prompt token payloads by thousands of tokens and preserves model quotas.

Related Resources

Fastio features

Protect AI Model Quotas with Fast.io Workspaces

Stop burning through model rate limits and token caps by pasting files into prompts. Keep your team's code, specifications, and documentation in an intelligent Fast.io workspace where agents search indexed content through remote MCP. Monthly plans start with a 14-day free trial that requires a credit card.