Cost
You pay for the tokens that sit in the window, including history and documents the question may not need. Re-sending the same history or documents every turn adds up. Prompt caching can make the repeated part much cheaper.
Map · Foundations · 02 · Context Window
Concept card · Foundations
The context window is the fixed text one request can hold: instructions, history, documents, and the answer.
The fixed text one request can hold: instructions, history, documents, and the answer.
Oct 16: Cost now notes that resending the same history or documents adds up, and that prompt caching can make the repeated part cheaper. The risk line no longer says how often a full window causes a miss.
The context window is how much text one request can hold. That includes the system prompt, the conversation so far, documents you attach, and the answer the model is still writing. Text that does not fit is not visible to the model for that request.
You pay for the tokens that sit in the window, including history and documents the question may not need. Re-sending the same history or documents every turn adds up. Prompt caching can make the repeated part much cheaper.
When the window is full of old turns or long documents, less room is left for the question and the answer.
Text that does not fit is outside that request. An instruction or a fact can be among what the model does not see.
On a long chat, start a fresh thread and paste only the brief and the source you still need.
Assuming the model still sees the first messages after the thread has grown past the window.
You send the same long document on every turn. What can change the cost of that repeated part?
Coming soon. Lay out one real request and mark what you would drop first.
Coming soon. How products differ when the window is full: some refuse, some trim, some cut.