A context limit describes an API contract. It does not tell you how reliably a model will use every part of an input, how long an answer can be, or how much a request costs. Compare the exact input, combined-window and output limits before treating two “million-token” models as interchangeable.
Selected documented limits
| Model | Context contract | Output ceiling | Additional condition |
|---|---|---|---|
gpt-5 | 400,000 combined; 272,000 maximum input | 128,000 | The combined limit does not authorize a prompt larger than the separate input cap. |
gemini-3.5-flash-lite | 1,048,576 input | 65,536 | Google publishes input and output limits separately. |
claude-sonnet-5 | 1,000,000 window | 128,000 | Active legacy model. Its separately documented Batch output beta is not the ordinary output ceiling. |
qwen3.8-flash | 1,000,000 combined | 131,072 | Input: 991,808 without thinking; 983,616 with thinking. |
Counts are tokens, not words or pages. The table is a documented selection, not a complete model ranking or a recommendation to start a new integration on a legacy model. Use the linked Flash-Lite and Sonnet records for capability and lifecycle context, and the context directory for wider discovery. Check the exact deployment and version before sending a request.
Count the assembled request
The document is only part of the input. Instructions, prior messages, tool definitions, retrieved passages and tool results can consume the same request budget. Images, audio, video and provider-managed features use their own counting rules. A local estimate of plain text does not validate an entire multimodal request.
For a combined-window contract, input and the requested answer must fit together under that provider's rules; a separate input cap can be stricter. Reasoning and internal context accounting also vary by API. Do not infer an undocumented input limit by subtracting the advertised output limit from a combined window.
The token counter is useful for initial text planning, subject to its stated tokenizer coverage. Production checks should use the provider's documented counting or usage path for the intended request format. Reserve space for the answer and for bounded tool results before a multi-turn workflow reaches the ceiling.
Accepted length and usable evidence are different tests
A request can be accepted while its answer omits an important exception, joins unrelated versions or cites a passage that does not support the claim. Test those failures directly. There is no evidence here for a universal “safe” fraction of a context window or a fixed point at which every model loses a particular percentage of accuracy.
RULER tests configurable sequence lengths and task complexity, including more than simple recall. BABILong tests reasoning over facts dispersed through long inputs. The LongBench project provides long-context evaluation tasks. These are useful test designs, not measurements of the current models in this table. Older model results cannot rank a newer API version without a matching run.
A practical evaluation for your document set
- Preserve a corpus revision. Keep extraction output, document identities and the expected answer with supporting passages. A changing corpus makes failures difficult to reproduce.
- Vary evidence placement. Put required material near the beginning, middle and end without changing the answer. Include irrelevant but related text and conflicting outdated versions.
- Vary the task. Test exact retrieval, reasoning across passages, exception handling, comparison and missing-answer abstention. A copied identifier does not prove whole-document understanding.
- Record actual request conditions. Save the model version, endpoint, token counts, output budget, reasoning setting, truncation policy and tool configuration.
- Compare failure rates and cost. Separate unsupported answers from omissions, invalid requests, timeouts and truncated outputs. Include retries and human review rather than reporting only successful completions.
This is a proposed evaluation protocol, not an executed benchr benchmark. Keep acceptance criteria independent of which model produces an answer. If a judge is another model, inspect its agreement with human review on difficult examples and retain the original outputs.
Long requests can change the price band
A monthly token total is not a request size. Some providers change rates above a per-request input threshold, and some apply the higher output rate to the whole request. Cached input can still count toward that threshold. Other models retain one rate across their supported input band.
The request-mix calculator handles groups separately and rejects unsupported assumptions. Compare a long request, a retrieved-context request and any cache reuse using explicit counts. A cheaper request is useful only if it still meets the same evidence and answer requirements. See the long-context architecture comparison for worked arithmetic and operational tradeoffs.
Decide what to retain between turns
Appending an entire interaction indefinitely eventually reaches a limit, regardless of the opening window size. Decide which state belongs in structured storage, which source text should be retrieved again and which history can be summarized. Keep source pointers for facts that a lossy summary could distort.
Truncation is a product decision: dropping an earlier instruction, a tool result or a user's correction changes behavior. Make the policy explicit, test it at the boundary and show an actionable failure instead of silently promising that a larger window remembers everything. For evidence selection, continue with retrieval versus training; for observed output review, use Labs without interpreting local ratings as provider benchmarks.