Context Windows By Model ⚠ verify
Definition
The maximum number of tokens (input + output + thinking) a model can process in a single request, which varies by model and is billed at standard rates across the whole window.
Key points
- 1M-token window: Opus 4.8 / 4.7 / 4.6, Sonnet 5, Sonnet 4.6, Fable 5, Mythos 5, Mythos Preview. 1M is the default — no beta header needed, billed at standard per-token pricing (a 900k request costs the same per token as a 9k one). ⚠ verify current model IDs/context sizes (2026-07-08).
- 200k-token window: Haiku 4.5, Sonnet 4.5, Opus 4.5, Opus 4.1 (and other legacy). Max output 64k (Haiku 4.5) or lower.
- Max output on 1M models = 128k tokens (
max_tokens); on the Batch API, Opus 4.8/4.7/4.6, Sonnet 5, Sonnet 4.6 reach 300k via beta headeroutput-300k-2026-03-24. - What counts toward the window: system prompt, every message (tool results, images, documents), tool definitions, and generated output including extended thinking. All three caching buckets —
input_tokens,cache_read_input_tokens,cache_creation_input_tokens— count. - Image/PDF limit: 600 images or PDF pages per request on 1M models (100 on 200k models).
- Newer tokenizer (Opus 4.7+, Fable 5, Sonnet 5) produces ~30% more tokens for the same text vs Sonnet 4.6 and earlier — a bigger window does not always mean proportionally more content.
Why it matters for the exam
- Sizing scenarios: choosing a model for a large-document or long-session task turns on window size (1M vs 200k) and max output.
- The exam tests that thinking blocks and tool results count toward the window, not just the visible prompt.
Common gotchas
- Bigger window ≠ better recall: accuracy still degrades as tokens grow — see Context Rot.
- 200k models (Haiku 4.5, Sonnet 4.5) can't hold what a 1M model can; don't assume all current models are 1M.
- Overflow is handled differently by model — see model_context_window_exceeded behaviour.
See also
Sources
Referenced by
Practice questions optional · AI
Generate fresh practice questions about this concept with AI. These are not vault-verified.