📜

AI Model Context Window Cheat Sheet

Compare how much text each model can ingest and return. Pick the right model for documents, codebases, transcripts, and agent memory.

What fits your content?

🌀

OpenAI GPT

GPT-4o

Context 128,000 Output 16,384

Multimodal flagships; fast tokenizer.

GPT-4o-mini

Context 128,000 Output 16,384

Cheaper, same context window as 4o.

o3 / o4-mini

Context 200,000 Output 100,000

Reasoning models; large context for code/reasoning.

GPT-4.1 / GPT-4.1-mini

Context 1,000,000 Output 32,768

1M-token context for long-document analysis.

o1 / o1-mini

Context 128,000 Output 32,768

Legacy reasoning series; smaller output cap.

🟣

Anthropic Claude

Claude 4 Opus

Context 200,000 Output 64,000

Highest reasoning quality; 200K context.

Claude 4 Sonnet

Context 200,000 Output 64,000

Balanced speed and capability.

Claude 4 Haiku

Context 200,000 Output 8,192

Fast and cheap; same context as larger siblings.

Claude 3.5 Sonnet

Context 200,000 Output 8,192

Widely deployed; strong coding agent use.

Claude 3 Opus / Sonnet / Haiku

Context 200,000 Output 4,096

Legacy Claude 3 family.

🔵

Google Gemini

Gemini 2.5 Pro

Context 1,000,000 Output 64,000

1M context; strong long-context retrieval.

Gemini 2.5 Flash

Context 1,000,000 Output 64,000

Fast multimodal with 1M context.

Gemini 2.0 Pro / Flash

Context 2,000,000 Output 8,192

Up to 2M tokens for video/audio docs.

Gemini 1.5 Pro / Flash

Context 1,000,000 Output 8,192

First mainstream 1M-context model.

🦙

Meta Llama

Llama 4 Scout

Context 128,000 Output 128,000

Multimodal MoE; long context for local.

Llama 4 Maverick

Context 128,000 Output 128,000

Strong coding and reasoning.

Llama 3.3 70B

Context 128,000 Output 128,000

Efficient instruction model.

Llama 3.1 8B / 70B / 405B

Context 128,000 Output 128,000

128K standard across all sizes.

Llama 3.2 1B / 3B

Context 128,000 Output 128,000

Tiny edge models with long context.

🟠

Alibaba Qwen

Qwen3 235B / 32B / 30B / 14B / 8B / 4B

Context 128,000 Output 8,192

128K context across dense and MoE variants.

Qwen2.5 72B / 32B / 14B / 7B

Context 128,000 Output 8,192

Strong open models; 128K context.

Qwen2.5-VL

Context 128,000 Output 8,192

Vision-language with long context.

🌬️

Mistral AI

Mistral Large 2

Context 128,000 Output 128,000

Commercial flagship; 128K window.

Mistral Small 3.1 / 24B

Context 128,000 Output 128,000

Open-weight small models with 128K.

Pixtral Large / 12B

Context 128,000 Output 128,000

Vision model with 128K context.

Codestral

Context 32,000 Output 32,000

Code-specialized; 32K context.

🐋

DeepSeek

DeepSeek-V3

Context 64,000 Output 8,192

MoE generalist; 64K context.

DeepSeek-R1

Context 64,000 Output 8,192

Open reasoning model; 64K context.

DeepSeek-V2

Context 128,000 Output 8,192

Earlier version with 128K claim (often 64K practical).

xAI Grok

Grok 3 / Grok 3 Mini

Context 131,072 Output 131,072

128K context for chat and coding.

Grok 2

Context 131,072 Output 131,072

Prior generation with same 128K window.

🏠

Local / Quantized

Llama.cpp / Ollama

Context 128,000 Output 128,000

Context limited by VRAM, not model; reduce KV cache with quantization.

vLLM

Context 128,000 Output 128,000

Serves full-context models if GPU memory allows.

KTransformers / llamafile

Context 128,000 Output 128,000

Offload-aware; effective context depends on RAM/VRAM.

MLX (Apple Silicon)

Context 128,000 Output 128,000

Unified memory; large context possible on Macs with 32-128 GB RAM.

How to use this cheat sheet

  • Context = total tokens the model can process (system + input + history + tools).
  • Output = maximum tokens the model is allowed to generate in one response.
  • Local/quantized models are usually VRAM-limited; use the VRAM calculator to size the KV cache.
  • For agent memory that spans many turns, prefer models with high context and low API cost. Use the LLM cost calculator to compare.

🤖 Use this tool in your agent

✓ Agent-ready code

Copy the snippet below into your agent, newsletter, or script. The tool page at hermesdispatch.dev/tools/context-window-cheat-sheet/ is the canonical contract: inputs, outputs, and formulas.

python
# Hermes Dispatch Tool — Context Window Cheat Sheet
# Source: https://hermesdispatch.dev/tools/context-window-cheat-sheet/
# Description: Look up context window sizes for LLM families and models.
# License: MIT (generated by hermesdispatch.dev)
#
# INSTALL:
#   1. Save this file as ~/.hermes/hermes-agent/tools/context_window_lookup.py
#   2. Restart Hermes or run /reset in a session
#   3. The tool auto-registers if Hermes uses auto-discovery of tools/*.py
#
# MANUAL REGISTRY (if auto-discovery is off):
#   from tools.context_window_lookup import register
#   register()

import json

DATA = {"families": {"openai": {"name": "OpenAI GPT", "icon": "\ud83c\udf00", "models": [{"name": "GPT-4o", "context": 128000, "output": 16384, "notes": "Multimodal flagships; fast tokenizer."}, {"name": "GPT-4o-mini", "context": 128000, "output": 16384, "notes": "Cheaper, same context window as 4o."}, {"name": "o3 / o4-mini", "context": 200000, "output": 100000, "notes": "Reasoning models; large context for code/reasoning."}, {"name": "GPT-4.1 / GPT-4.1-mini", "context": 1000000, "output": 32768, "notes": "1M-token context for long-document analysis."}, {"name": "o1 / o1-mini", "context": 128000, "output": 32768, "notes": "Legacy reasoning series; smaller output cap."}]}, "anthropic": {"name": "Anthropic Claude", "icon": "\ud83d\udfe3", "models": [{"name": "Claude 4 Opus", "context": 200000, "output": 64000, "notes": "Highest reasoning quality; 200K context."}, {"name": "Claude 4 Sonnet", "context": 200000, "output": 64000, "notes": "Balanced speed and capability."}, {"name": "Claude 4 Haiku", "context": 200000, "output": 8192, "notes": "Fast and cheap; same context as larger siblings."}, {"name": "Claude 3.5 Sonnet", "context": 200000, "output": 8192, "notes": "Widely deployed; strong coding agent use."}, {"name": "Claude 3 Opus / Sonnet / Haiku", "context": 200000, "output": 4096, "notes": "Legacy Claude 3 family."}]}, "google": {"name": "Google Gemini", "icon": "\ud83d\udd35", "models": [{"name": "Gemini 2.5 Pro", "context": 1000000, "output": 64000, "notes": "1M context; strong long-context retrieval."}, {"name": "Gemini 2.5 Flash", "context": 1000000, "output": 64000, "notes": "Fast multimodal with 1M context."}, {"name": "Gemini 2.0 Pro / Flash", "context": 2000000, "output": 8192, "notes": "Up to 2M tokens for video/audio docs."}, {"name": "Gemini 1.5 Pro / Flash", "context": 1000000, "output": 8192, "notes": "First mainstream 1M-context model."}]}, "meta": {"name": "Meta Llama", "icon": "\ud83e\udd99", "models": [{"name": "Llama 4 Scout", "context": 128000, "output": 128000, "notes": "Multimodal MoE; long context for local."}, {"name": "Llama 4 Maverick", "context": 128000, "output": 128000, "notes": "Strong coding and reasoning."}, {"name": "Llama 3.3 70B", "context": 128000, "output": 128000, "notes": "Efficient instruction model."}, {"name": "Llama 3.1 8B / 70B / 405B", "context": 128000, "output": 128000, "notes": "128K standard across all sizes."}, {"name": "Llama 3.2 1B / 3B", "context": 128000, "output": 128000, "notes": "Tiny edge models with long context."}]}, "alibaba": {"name": "Alibaba Qwen", "icon": "\ud83d\udfe0", "models": [{"name": "Qwen3 235B / 32B / 30B / 14B / 8B / 4B", "context": 128000, "output": 8192, "notes": "128K context across dense and MoE variants."}, {"name": "Qwen2.5 72B / 32B / 14B / 7B", "context": 128000, "output": 8192, "notes": "Strong open models; 128K context."}, {"name": "Qwen2.5-VL", "context": 128000, "output": 8192, "notes": "Vision-language with long context."}]}, "mistral": {"name": "Mistral AI", "icon": "\ud83c\udf2c\ufe0f", "models": [{"name": "Mistral Large 2", "context": 128000, "output": 128000, "notes": "Commercial flagship; 128K window."}, {"name": "Mistral Small 3.1 / 24B", "context": 128000, "output": 128000, "notes": "Open-weight small models with 128K."}, {"name": "Pixtral Large / 12B", "context": 128000, "output": 128000, "notes": "Vision model with 128K context."}, {"name": "Codestral", "context": 32000, "output": 32000, "notes": "Code-specialized; 32K context."}]}, "deepseek": {"name": "DeepSeek", "icon": "\ud83d\udc0b", "models": [{"name": "DeepSeek-V3", "context": 64000, "output": 8192, "notes": "MoE generalist; 64K context."}, {"name": "DeepSeek-R1", "context": 64000, "output": 8192, "notes": "Open reasoning model; 64K context."}, {"name": "DeepSeek-V2", "context": 128000, "output": 8192, "notes": "Earlier version with 128K claim (often 64K practical)."}]}, "xai": {"name": "xAI Grok", "icon": "\u26ab", "models": [{"name": "Grok 3 / Grok 3 Mini", "context": 131072, "output": 131072, "notes": "128K context for chat and coding."}, {"name": "Grok 2", "context": 131072, "output": 131072, "notes": "Prior generation with same 128K window."}]}, "local": {"name": "Local / Quantized", "icon": "\ud83c\udfe0", "models": [{"name": "Llama.cpp / Ollama", "context": 128000, "output": 128000, "notes": "Context limited by VRAM, not model; reduce KV cache with quantization."}, {"name": "vLLM", "context": 128000, "output": 128000, "notes": "Serves full-context models if GPU memory allows."}, {"name": "KTransformers / llamafile", "context": 128000, "output": 128000, "notes": "Offload-aware; effective context depends on RAM/VRAM."}, {"name": "MLX (Apple Silicon)", "context": 128000, "output": 128000, "notes": "Unified memory; large context possible on Macs with 32-128 GB RAM."}]}}, "contextPresets": [{"label": "Tweet / short prompt", "tokens": 50}, {"label": "Paragraph", "tokens": 200}, {"label": "Blog post", "tokens": 1500}, {"label": "Research paper", "tokens": 8000}, {"label": "Book chapter", "tokens": 25000}, {"label": "Long codebase", "tokens": 50000}, {"label": "Full repo + docs", "tokens": 100000}, {"label": "Multi-hour transcript", "tokens": 200000}, {"label": "1M-token corpus", "tokens": 1000000}]}

def _ok(result):
    return json.dumps({"success": True, "data": result}, indent=2)

def _err(message):
    return json.dumps({"success": False, "error": message}, indent=2)


TOOL_NAME = "context_window_lookup"
TOOLSET = "ai"

SCHEMA = {
  "type": "function",
  "function": {
    "name": "context_window_lookup",
    "description": "Look up context window sizes for LLM families and models.",
    "parameters": {
      "type": "object",
      "properties": {
        "model": {
          "type": "string",
          "description": "Model or family name to search."
        }
      },
      "required": []
    }
  }
}

def _run(args):
    model = args.get("model", "")
    results = []
    for family in DATA["families"]:
        for m in family.get("models", []):
            if not model or model.lower() in m.get("name", "").lower() or model.lower() in family.get("family", "").lower():
                results.append({
                    "family": family.get("family"),
                    "model": m.get("name"),
                    "context_window": m.get("context_window"),
                    "notes": m.get("notes", "")
                })
    return _ok({"matches": results[:10]})

def HANDLER(args):
    try:
        return _run(args)
    except Exception as e:
        return _err(str(e))


def register():
    """Manual registry hook. Import and call this to register with Hermes."""
    try:
        from tools.registry import registry
        registry.register(
            name=TOOL_NAME,
            toolset=TOOLSET,
            schema=SCHEMA,
            handler=HANDLER,
        )
    except ImportError:
        print("Hermes registry not found; skipping manual registration.")

if __name__ == "__main__":
    # CLI smoke test
    print(HANDLER({}))

Want early access to the next locked tool? Subscribe to The Hermes Dispatch.

🚀 Get AI automation insights daily

15:00 MST. One-click unsubscribe.

Subscribe