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?
Models whose total window covers your content plus a reasonable output buffer (~25%):
OpenAI GPT
GPT-4o
Multimodal flagships; fast tokenizer.
GPT-4o-mini
Cheaper, same context window as 4o.
o3 / o4-mini
Reasoning models; large context for code/reasoning.
GPT-4.1 / GPT-4.1-mini
1M-token context for long-document analysis.
o1 / o1-mini
Legacy reasoning series; smaller output cap.
Anthropic Claude
Claude 4 Opus
Highest reasoning quality; 200K context.
Claude 4 Sonnet
Balanced speed and capability.
Claude 4 Haiku
Fast and cheap; same context as larger siblings.
Claude 3.5 Sonnet
Widely deployed; strong coding agent use.
Claude 3 Opus / Sonnet / Haiku
Legacy Claude 3 family.
Google Gemini
Gemini 2.5 Pro
1M context; strong long-context retrieval.
Gemini 2.5 Flash
Fast multimodal with 1M context.
Gemini 2.0 Pro / Flash
Up to 2M tokens for video/audio docs.
Gemini 1.5 Pro / Flash
First mainstream 1M-context model.
Meta Llama
Llama 4 Scout
Multimodal MoE; long context for local.
Llama 4 Maverick
Strong coding and reasoning.
Llama 3.3 70B
Efficient instruction model.
Llama 3.1 8B / 70B / 405B
128K standard across all sizes.
Llama 3.2 1B / 3B
Tiny edge models with long context.
Alibaba Qwen
Qwen3 235B / 32B / 30B / 14B / 8B / 4B
128K context across dense and MoE variants.
Qwen2.5 72B / 32B / 14B / 7B
Strong open models; 128K context.
Qwen2.5-VL
Vision-language with long context.
Mistral AI
Mistral Large 2
Commercial flagship; 128K window.
Mistral Small 3.1 / 24B
Open-weight small models with 128K.
Pixtral Large / 12B
Vision model with 128K context.
Codestral
Code-specialized; 32K context.
DeepSeek
DeepSeek-V3
MoE generalist; 64K context.
DeepSeek-R1
Open reasoning model; 64K context.
DeepSeek-V2
Earlier version with 128K claim (often 64K practical).
xAI Grok
Grok 3 / Grok 3 Mini
128K context for chat and coding.
Grok 2
Prior generation with same 128K window.
Local / Quantized
Llama.cpp / Ollama
Context limited by VRAM, not model; reduce KV cache with quantization.
vLLM
Serves full-context models if GPU memory allows.
KTransformers / llamafile
Offload-aware; effective context depends on RAM/VRAM.
MLX (Apple Silicon)
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 codeCopy 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.
# 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.