The context window is the maximum token budget for a request. It includes instructions, messages, tool definitions, documents, multimodal inputs, and usually the space needed for the response.
If a request is too large, the API may reject it or a client library may truncate content. Silent truncation is dangerous because it can remove system rules or important evidence. The exact behavior depends on the provider and endpoint.
Count tokens before large requests, reserve output space, and apply an explicit history policy. Common options are dropping irrelevant turns, summarizing old context, retrieving selected documents, and reducing tool descriptions. Log what was removed so a quality failure can be explained.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓