LLM Context Window Sizes in 2026: Every Model's Limit, the Long-Context Price Cliffs, GPT-4o's 128K, and What Happens When a Chat Runs Out

Context EngineeringAI Agent MemoryGaurav Dadhich27 September 202625 min read
LLM Context Window Sizes in 2026: Every Model's Limit, the Long-Context Price Cliffs, GPT-4o's 128K, and What Happens When a Chat Runs Out
On this page
  1. Context windows of the major models, October 2026
  2. GPT-4o's context window, and where GPT-4o stands in October 2026
  3. The long-context price cliffs: 100K, 200K and 272K
  4. What one full context window costs
  5. What counts against the window, and how much text fits
  6. Max output is the limit that binds first
  7. What happens when an API request exceeds the context window
  8. What happens when a chat exceeds the window in ChatGPT, Claude and Gemini
  9. Chats degrade before they hit the wall
  10. Which number to design against
  11. How context windows got here
  12. Truncate, summarise or compact: choosing an overflow policy
  13. What to do when your own chat hits the limit
  14. A bigger context window is still not memory
  15. Frequently asked questions

Published 27 September 2026 · Updated 28 October 2026. Every context window, output limit, price and overflow behaviour below was read from the OpenAI, Anthropic, Google, xAI, DeepSeek, Mistral and Meta documentation on 28 October 2026, and every price is as of that date.

The frontier context window in October 2026 is about one million tokens, and six of the seven major API vendors are there: OpenAI's GPT-6 family lists 1,050,000 tokens with 128,000 of output, Anthropic's whole current Claude line (Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5) lists 1,000,000 with 128,000 of output, Google's new Gemini 4 Argon and Gemini 3.8 Flash list 1,048,576, Meta's Muse Wonder and Muse Spark list 1,048,576, DeepSeek and Mistral Large 4 list 1M, and xAI's Grok 4.7 is the outlier at 500,000. The largest published window belongs to an open-weight model, Meta's Llama 4 Scout, at 10 million tokens.

The ceiling is no longer the number that decides your bill. Four vendors now charge more once a prompt passes a threshold far below that ceiling: Claude Haiku 5.5 at 100,000 tokens, Gemini 3.1 Pro and Grok 4.7 at 200,000, and OpenAI's GPT-6 family at 272,000. Each cliff sets the rate for the whole request rather than for the tokens above the line, so a Haiku 5.5 prompt of 100,001 tokens costs five times as much per token as one of 100,000.

GPT-4o, which plenty of production code still pins, has a 128,000-token context window and can write at most 16,384 tokens in a single reply, with the reply counted inside the same 128,000. OpenAI marked it deprecated on 14 October 2026, and its remaining API snapshots shut down on 14 January 2027. Below are the current numbers for every major model, the price cliffs, what each API and each chat app does at the limit, and why none of it carries a single fact into tomorrow's session.

Context windows of the major models, October 2026

Every figure in this table comes from the vendor's own model or pricing page, not from a comparison site, because several of the comparison tables ranking for this query today list windows the vendors do not publish (one lists a 10M-token Gemini 3 Pro; Google's model pages list 1,048,576 for every current Gemini model).

ModelVendorContext window (tokens)Max output (tokens)Input / output per 1M tokensAbove a prompt-length threshold
GPT-6 AstraOpenAI1,050,000128,000$10 / $50Over 272K input: 2x input and cache, 1.5x output, whole request
GPT-6.1 SolOpenAI1,050,000128,000$2 / $10Same 272K rule
GPT-6.1 TerraOpenAI1,050,000128,000$1 / $5Same 272K rule
GPT-6 LunaOpenAI1,050,000128,000$0.10 / $0.50Same 272K rule
GPT-4.1OpenAI1,047,57632,768$2 / $8Deprecated; shuts down 14 Jan 2027
GPT-4oOpenAI128,00016,384$2.50 / $10Deprecated; shuts down 14 Jan 2027
Claude Fable 5.1Anthropic1,000,000128,000$10 / $50None: full 1M at standard rates
Claude Opus 5.5Anthropic1,000,000128,000$4 / $20None
Claude Sonnet 5.5Anthropic1,000,000128,000$2 / $10None
Claude Haiku 5.5Anthropic1,000,000128,000$0.10 / $0.50Over 100,000 prompt tokens: $0.50 / $2.50
Claude Haiku 4.5 (legacy)Anthropic200,00064,000$1 / $5None
Gemini 4 ArgonGoogle1,048,576, shared by input and output65,536 by default; up to 1,048,576 minus the input with long decode$2 / $10 through 30 Nov 2026, then $4 / $20No tier listed
Gemini 3.8 FlashGoogle1,048,57665,536$0.75 / $3.75 through 31 Dec 2026, then $1.50 / $7.50No tier listed
Gemini 3.1 Pro (preview)Google1,048,57665,536$2 / $12Over 200K: $4 / $18
Grok 4.7xAI500,000Not listed$2 / $6200K and above: $4 / $12, all tokens in the request
DeepSeek V4.1 Flash (deepseek-flash)DeepSeek1M384K$0.30 / $1.20 peak, half off-peakNo tier listed
DeepSeek V4 ProDeepSeek1M384K$1.32 / $3.96 peak, half off-peakNo tier listed
Mistral Large 4 (public preview)Mistral1MNot listed$1.36 / $4.18No tier listed
Mistral Medium 3.5Mistral256KNot listed$1.50 / $7.50No tier listed
Muse Wonder 1.0 (preview)Meta1,048,576Not listed$4 / $20"No long-context premium"
Muse Spark 1.3Meta1,048,576Not listed$1.25 / $4.25"No long-context premium"
Llama 4 Scout (open weights)Meta10MNot listedSelf-hostedn/a
Llama 4 Maverick (open weights)Meta1MNot listedSelf-hostedn/a

Sources, all read 28 October 2026: OpenAI models and the linked model pages, OpenAI deprecations, Anthropic models overview, Claude Haiku 4.5, Anthropic pricing, Gemini models, Gemini pricing, xAI pricing, DeepSeek models and pricing, Mistral models, Meta Model API models and pricing, and the Llama 4 model card. We break the Claude and Gemini prices down line by line in our Claude API pricing guide and Gemini API pricing guide.

A few things in that table catch people out. Cheaper tiers no longer get smaller windows: Claude Haiku 5.5 publishes the same 1M window and 128K output limit as Opus 5.5, and GPT-6 Luna, which OpenAI describes as its most efficient model, publishes the same 1,050,000 and 128,000 as GPT-6 Astra. The "1M" figures are not identical either; GPT-4.1 lists 1,047,576, every current Gemini model in the table and both Muse models list 1,048,576 (two to the twentieth power), GPT-5.5, GPT-5.6 Sol and the GPT-6 family list 1,050,000, and Anthropic and DeepSeek publish a round million. The differences are a few thousand tokens and matter only if you are packing a prompt to the last token. Mistral Large 4 and Muse Wonder are previews, and xAI, Mistral and Meta do not publish a maximum output figure on the pages read today, so the cells say so rather than guessing.

GPT-4o's context window, and where GPT-4o stands in October 2026

OpenAI's GPT-4o model page lists three numbers that still hold: a 128,000-token context window, a 16,384-token maximum output, and a knowledge cutoff of 1 October 2023. The page now also carries a new line, "Status: Deprecated". The context window is shared: OpenAI's conversation state guide defines it as "the total tokens that can be used for both input and output tokens (and for some models, reasoning tokens)", so a prompt of 120,000 tokens leaves room for at most 8,000 tokens of answer, not 16,384.

GPT-4o left ChatGPT first and is now leaving the API. OpenAI retired GPT-4o from ChatGPT on 13 February 2026, along with GPT-4.1, GPT-4.1 mini and o4-mini, while leaving the API untouched at the time. On 14 October 2026 OpenAI's deprecations page gave notice that gpt-4o-2024-08-06 and gpt-4o-2024-11-20, together with GPT-4o mini, GPT-4.1 and GPT-4.1 mini, shut down on 14 January 2027, with gpt-6-luna as the recommended replacement for all of them. The original gpt-4o-2024-05-13 snapshot already shut down on 23 October 2026. If an application pinned to GPT-4o is hitting its 128K ceiling, the migration solves the window problem as a side effect: GPT-6 Luna carries 1,050,000 tokens and 128,000 of output at $0.10 input and $0.50 output per million, against GPT-4o's $2.50 and $10.

The long-context price cliffs: 100K, 200K and 272K

A prompt that crosses a vendor's threshold is repriced in full, not just for the tokens above the line. Here is how each vendor words it on the pages read today.

Vendor and modelsThresholdWhat changesHow it is applied
Anthropic, Claude Haiku 5.5Prompt over 100,000 tokensInput $0.10 to $0.50; output $0.50 to $2.50; cache reads $0.01 to $0.05Counts all input tokens, cache reads and cache writes included; each request priced on its own
Anthropic, every other Claude model from 4.6 onNoneFull 1M at standard rates"A 900k-token request is billed at the same per-token rate as a 9k-token request"
Google, Gemini 3.1 Pro (preview)Prompt over 200K tokensInput $2 to $4; output $12 to $18; caching $0.20 to $0.40Rate set by the prompt's length
Google, Gemini 4 Argon and 3.8 FlashNo tier listedScheduled price rises instead: Argon doubles on 1 Dec 2026, 3.8 Flash on 1 Jan 2027Calendar, not prompt length
xAI, Grok 4.7Prompt of 200K tokens or moreInput $2 to $4; cached $0.50 to $1; output $6 to $12"Billed at the higher rate for all tokens in the request"
OpenAI, GPT-6, GPT-6.1, GPT-5.6 Sol and GPT-5.5More than 272K input tokens2x input and cache rates, 1.5x output"For the full request"
Meta, Muse Wonder and Muse SparkNone"No long-context premium"n/a

Sources: Anthropic long context pricing, Gemini pricing, Grok 4.7, the OpenAI model pages linked above, Meta pricing, read 28 October 2026. DeepSeek's and Mistral's pricing pages list a single rate per model.

The arithmetic at each edge is blunt. On Claude Haiku 5.5 a 100,000-token prompt costs $0.01 of input and a 100,001-token prompt costs $0.05. On Gemini 3.1 Pro, 200,000 tokens cost $0.40 and 200,001 cost $0.80. On Grok 4.7, 199,999 tokens cost $0.40 and 200,000 cost $0.80. On GPT-6.1 Sol, 272,000 tokens cost $0.544 and 272,001 cost $1.09, and the reply is billed at $15 instead of $10 per million. Haiku 5.5 has the steepest cliff: five times the input price, and because cache reads count toward the 100,000, a long cached system prompt can push an otherwise short request over the line. Anthropic's US-only inference option adds its 1.1x multiplier on top of both Haiku price bands.

What one full context window costs

A full window is billed on every call that carries it. At list input prices read today, and with the cliffs above applied, a single one-million-token prompt costs:

ModelInput cost of one 1M-token prompt
GPT-6 Astra$20.00 (the 272K rule doubles $10)
Claude Fable 5.1$10.00
GPT-6.1 Sol, GPT-6 Sol$4.00 (2x $2)
Claude Opus 5.5$4.00
Gemini 3.1 Pro (preview)$4.00 (over 200K rate)
Muse Wonder 1.0$4.00
Gemini 4 Argon, full 1,048,576$2.10 through 30 Nov, $4.19 from 1 Dec
Claude Sonnet 5.5, GPT-6.1 Terra$2.00
Mistral Large 4$1.36
DeepSeek V4 Pro$1.32 peak, $0.66 off-peak
Muse Spark 1.3$1.25
Gemini 3.8 Flash$0.75 through 31 Dec
Claude Haiku 5.5$0.50 (over 100K rate)
DeepSeek V4.1 Flash$0.30 peak, $0.15 off-peak
GPT-6 Luna$0.20 (2x $0.10)

Grok 4.7 cannot take a 1M prompt; its full 500,000-token window costs $2.00 at the 200K-and-above rate. GPT-4o's full 128,000 costs $0.32. The ranking by headline price and the ranking by full-window price are not the same list: GPT-6 Astra and Claude Fable 5.1 share a $10 headline input price, and Astra costs twice as much to fill.

Prompt caching lowers the price of a repeated prefix but does not free any space; in Anthropic's words, "cached prompt prefixes still occupy the context window: prompt caching changes what you pay for those tokens, not whether they count." And because an API call is stateless, a chat that re-sends its history every turn pays for that history again on every turn; our Agentic Context Management paper shows that naive accumulation "grows token cost quadratically in conversation length". We worked through the arithmetic, including where caching stops being enough, in how to reduce LLM token costs in long conversations.

What counts against the window, and how much text fits

Everything you send counts, not only the chat. Anthropic's context window documentation lists the system prompt, every message including tool results, images and documents, the tool definitions themselves, and the model's output including its thinking, and on Claude a single request can carry at most 600 images or PDF pages (100 on 200K models), so a document-heavy request can hit a request size limit before it hits the token limit. Meta is the one vendor that documents an exception in the other direction: the steering prompt it injects into every Muse request is not billed and is excluded from the token counts it reports.

The amount of text that fits depends on the tokenizer. Anthropic's models overview puts 1M tokens at roughly 555,000 words or 2.5M characters on the tokenizer introduced with Claude Opus 4.7, against about 750,000 words for earlier Claude models, so the same document takes more of a current Claude window than it did a year ago; 200K tokens is roughly 150,000 words. Google's Gemini Apps help page puts one million tokens at roughly 1,500 pages of text or 30,000 lines of code, which is why a 1M window feels infinite in a demo and finite in an agent that reads tool output all day. Code and non-English text tokenize differently, so for anything close to a limit, count with the vendor's own token counter rather than a rule of thumb.

Max output is the limit that binds first

For coding agents and long reports, the reply cap usually bites before the window does. Most current models stop at 128,000 output tokens (OpenAI and Anthropic) or 65,536 (Gemini by default), GPT-4.1 at 32,768 and GPT-4o at 16,384, so a model that can read a million tokens still needs several turns to write a large change, and every extra turn re-sends the growing history. DeepSeek's 384K output cap is the largest fixed one in the table. Anthropic lifts the cap to 300,000 output tokens on its Message Batches API for current models with the output-300k-2026-03-24 beta header.

Gemini 4 Argon is the exception. Its window is a single budget of 1,048,576 tokens "shared across input, thinking, and output", and Google's long decode guide lets a response run past 65,536 tokens up to 1,048,576 minus your input, but only as a background interaction: without background execution, asking for more than 65,536 output tokens returns a 400 error. A response that writes 600,000 tokens leaves room for at most 448,576 tokens of input.

What happens when an API request exceeds the context window

The model never decides this. A transformer is trained on sequences up to a fixed length, and pushing positions past that length "may lead to catastrophically high attention scores that completely ruin the self-attention mechanism", as the authors of the Position Interpolation paper put it, so every provider enforces the ceiling in the serving layer, and each one enforces it differently.

SurfaceInput already too largeReply would run past the windowBuilt-in way to keep going
OpenAI Responses API400 error by default (truncation: "disabled"); with truncation: "auto" the oldest items are droppedOutput may be truncatedServer-side compaction via context_management and compact_threshold, or the standalone /responses/compact endpoint
Anthropic Messages API400 invalid_request_error, "prompt is too long", on every modelClaude 4.5 and newer accept the request and stop with stop_reason: "model_context_window_exceeded"; older models return a validation errorServer-side compaction (beta), on demand or at a token threshold, optionally keeping recent turns word for word
Google Gemini API400: "The input token count (...) exceeds the maximum number of tokens allowed (1048576)"On Gemini 4 Argon, a requested output above 65,536 without background execution returns a 400Long decode for output; no input compaction documented on the pages read

OpenAI's behaviour is set by the truncation parameter in the Responses API reference: the default fails the request with a 400, and auto drops items from the beginning of the conversation, which usually means the instructions you wrote first. For long conversations OpenAI's documentation steers developers toward compaction instead, where the server replaces earlier turns with an encrypted compaction item once the rendered token count crosses a threshold you set; that item is opaque and not intended to be human-interpretable, so you cannot inspect what was kept.

Anthropic separates the two failure cases cleanly. An oversized prompt fails up front; an oversized reply on a current model returns HTTP 200 with a partial answer and a stop reason, which means code that only catches exceptions will ship truncated answers to users without noticing. Anthropic's compaction, available in beta on Claude 4.6 and later, writes a readable summary on the server and can keep the most recent turns word for word. Google's input error text comes from a public Gemini CLI issue opened in October 2025, where a 2,551,556-token request was refused against a 1,048,576 limit.

What happens when a chat exceeds the window in ChatGPT, Claude and Gemini

Chat apps do not give you the model's full window, and each app handles the edge differently.

App and planContext window in the app
ChatGPT Free27K (Instant); reasoning "varies"
ChatGPT Go, Plus and Business54K (Instant); 256K (Reasoning)
ChatGPT Pro128K (Instant); 400K (Reasoning)
ChatGPT Enterprise128K (Instant); 256K (Reasoning)
Claude paid plansUp to 1M on the newest models; 500K or 200K on others
Gemini without a plan32K
Gemini AI Plus128K
Gemini AI Pro and AI Ultra1M

Sources: ChatGPT pricing, Claude usage and length limits, Gemini Apps limits, read 28 October 2026. OpenAI's footnote adds that the space available for your own input is smaller than these totals and that the figures are approximate and can change.

ChatGPT. OpenAI publishes the per-plan windows above but does not document what ChatGPT does as a conversation approaches them. What users report, including in a thread on OpenAI's own developer forum opened on 27 August 2026, is a hard stop: a message saying the conversation has reached its maximum length and that they can keep talking by starting a new chat. Whether ChatGPT trims or summarises older turns before that point is not published, and pages that describe its internal trimming in detail are guessing. The gap between 54K in the Plus app and 1,050,000 for GPT-6 over the API is the whole reason a long ChatGPT chat can fail while the same model on the API would not.

Claude. Anthropic documents the behaviour. With code execution turned on, "when your conversation approaches the context window limit, Claude summarizes earlier messages to continue the conversation", the full history stays available for reference, and longer conversations consume more of your usage limit. Anthropic's API documentation adds that chat interfaces such as claude.ai "can also manage the context window on a rolling 'first in, first out' basis", which is the other name for dropping the oldest turns.

Gemini. Google's help page is candid about the failure mode rather than the mechanism: exceeding the window can produce answers that leave out part of the content provided or miss connections and details across it. There is no error; the answer simply stops reflecting part of what you gave it.

Chats degrade before they hit the wall

Running out of window is the visible failure. The quieter one starts much earlier. Lost in the Middle, by Nelson Liu and colleagues, found that performance "is often highest when relevant information occurs at the beginning or end of the input context, and significantly degrades when models must access relevant information in the middle of long contexts, even for explicitly long-context models". Chroma's context rot study tested 18 models with task difficulty held constant and found that "model performance degrades as input length increases, often in surprising and non-uniform ways". Anthropic writes the same thing into its own documentation: "As token count grows, accuracy and recall degrade."

So the advertised window is a capacity, not a promise of equal attention. The effective length at which a given model stays reliable on your task is not published for the current generation, and no benchmark we read reports it for GPT-6, Opus 5.5, Gemini 4 Argon or Muse Wonder; treat it as something to measure on your own data. The 10M figure for Llama 4 Scout deserves the same caution: Meta's model card notes that its context lengths "are evaluated across 512 GPUs using 5D parallelism", which tells you what was tested, not what a single serving node of yours will hold. For memory specifically there is a number: LongMemEval found commercial chat assistants and long-context LLMs "showing a 30% accuracy drop on memorizing information across sustained interactions".

Which number to design against

Every model now has three limits under it, and the advertised ceiling is the least useful of them, because it marks where requests fail, not where they work best. The price cliff arrives much earlier on four vendors, at 100K, 200K or 272K tokens, which is a tenth of the advertised window on Claude Haiku 5.5 and roughly a quarter of it on GPT-6. The quality threshold, the length past which recall on your task starts to slip, is unpublished for every model in the table, so it has to be measured on your own data.

For most agents the practical budget is the lowest of the first two. An assistant on Claude Haiku 5.5 that keeps each request under 100,000 tokens pays a fifth of what it would pay above; one on GPT-6.1 Sol that stays under 272,000 pays half the input rate and two-thirds of the output rate. Whole-codebase prompting follows the same logic: Google puts a million tokens at roughly 30,000 lines of code, so a repository of that size fits in a 1M window, but every turn that carries it pays for it again, it sits above every price cliff in the table, and recall across the middle of it is not guaranteed.

Long context and retrieval are complements, not rivals. Putting a whole corpus in the prompt is simple and pays to reprocess it on every call; retrieval loads only the relevant slice and needs a pipeline built and tuned. Anthropic's own Claude projects take the second route, using retrieval to load "only relevant content into the context window". Open weights change the cost side, not the window side: Llama 4 Scout (10M) and Maverick (1M) are free to download and expensive to serve at full length, while Gemini 3.8 Flash has a free tier on the Gemini API with the same 1,048,576-token window as the paid tier.

How context windows got here

The jump to a million tokens happened in under a year. Anthropic expanded Claude from 9K to 100K tokens on 11 May 2023, and Google announced Gemini 1.5 on 15 February 2024 with up to 1 million tokens. Meta's Llama 4 Scout later published 10 million. The commercial frontier has stayed at roughly one million since, and the 2026 releases moved the rest of each lineup up to it, from GPT-6 Luna to Claude Haiku 5.5, while the ceiling stayed put.

Truncate, summarise or compact: choosing an overflow policy

If you build on an API, you choose what happens at the limit, and the three options fail differently. Truncation (OpenAI's auto mode, or FIFO in your own code) is free and silent, and it removes the oldest turns first, which is where the user usually stated their constraints. Summarisation in your own code keeps the gist, costs an extra model call, and drifts when summaries get summarised again. Server-side compaction from OpenAI or Anthropic runs the summarisation for you; Anthropic's version can keep recent turns verbatim and shows you the summary, while OpenAI's returns an opaque item. Our paper's finding is that crude summarisation "buys linear cost at the price of an accuracy cliff, and only validated compaction achieves linear cost with preserved fidelity", which is why whatever you pick needs a check that the facts survived the squeeze.

Whichever policy you pick, the handling code has two halves. Before sending, count tokens against a budget you set below the ceiling and below the price cliff, leaving room for the reply and for reasoning tokens; Anthropic's Models API reports each model's limits so they do not have to be hard-coded, and its token counting endpoint estimates a request before you send it. After sending, catch the 400 on OpenAI, Gemini and Anthropic, and on Claude also check stop_reason for model_context_window_exceeded, because that failure arrives as a success.

What to do when your own chat hits the limit

For someone using ChatGPT, Claude or Gemini rather than building on them, the options are practical ones. Ask the assistant to summarise the conversation, then paste that summary into a new chat, which resets the window to near zero while keeping the thread. Move reference material into a project: Anthropic's help page notes that Claude projects use retrieval, loading only relevant content into the context window. On Claude, choosing a lower effort level for routine work leaves more room, since thinking tokens count, and Anthropic notes that tools and connectors are token-intensive. Upgrading changes the ceiling too; a ChatGPT Pro Instant chat gets 128K against 54K on Plus. None of this fixes the underlying problem, which is that the next chat starts empty.

A bigger context window is still not memory

A context window is per request. It holds what you sent on this call, and when the call ends nothing is kept unless your application sends it again. That is the definition, not a limitation of 2026 models, and it is why a 1M window changes how long one conversation can run while changing nothing about whether the agent knows the user next week. We make the full case on our bigger window is not a memory page, and the companion piece to this one explains the difference between short-term and long-term memory in LLMs, including what "context memory" means.

Maximem Synap is the layer we built for the part the window cannot do. Inside a conversation, Synap's Agentic Compaction keeps the working context bounded: it triggers at 3,000 tokens, 10 messages or 5 minutes idle, compresses to a 1,500-token target while keeping the last three conversation pairs verbatim, and returns a validation score and a preserved-facts count on every pass so you know the compression kept the signal. Across conversations, Synap extracts the facts worth keeping as they happen, and when the user returns the agent asks for context and gets a ranked block within a token budget (2,000 tokens by default) instead of the whole transcript. Reads are pre-fetched into a cache inside your own process, at an asserted P75 under 15 ms in conversation. A 2,000-token block sits far below every price cliff in the tables above, so the window becomes a place to reason over the right few thousand tokens and the bill stops tracking the length of the relationship.

Frequently asked questions

What is GPT-4o's context window?

GPT-4o has a 128,000-token context window and can write at most 16,384 tokens in a single reply, with the reply counted inside the same 128,000, according to OpenAI's model page read on 28 October 2026. A 120,000-token prompt therefore leaves at most 8,000 tokens for the answer. Its knowledge cutoff is 1 October 2023, and OpenAI now lists it as deprecated.

Is GPT-4o still available in 2026?

GPT-4o was retired from ChatGPT on 13 February 2026 and is still callable through the OpenAI API, but not for long. On 14 October 2026 OpenAI gave notice that gpt-4o-2024-08-06 and gpt-4o-2024-11-20 shut down on 14 January 2027, with gpt-6-luna as the recommended replacement; the older gpt-4o-2024-05-13 snapshot shut down on 23 October 2026. GPT-6 Luna has a 1,050,000-token window and a 128,000-token output limit.

Which LLM has the largest context window in 2026?

The largest published window is Meta's open-weight Llama 4 Scout at 10 million tokens, which you run yourself. Among hosted APIs, OpenAI's GPT-6 models list 1,050,000 tokens, Google's Gemini 4 Argon and Gemini 3.8 Flash and Meta's Muse models list 1,048,576, and Anthropic's current Claude models, DeepSeek's V4 models and Mistral Large 4 list 1M. Grok 4.7 lists 500,000. Quality still degrades as a window fills, so the largest window is not automatically the most reliable one.

Does Claude charge more for long context?

Claude charges more for long prompts only on Claude Haiku 5.5. A Haiku 5.5 request whose prompt is over 100,000 tokens pays $0.50 per million input and $2.50 per million output instead of $0.10 and $0.50, and cache reads and writes count toward the 100,000. Every other Claude model from the 4.6 generation on bills its full 1M window at standard rates. OpenAI's GPT-6 family doubles input above 272K tokens, and Gemini 3.1 Pro and Grok 4.7 double input from 200K.

What is the difference between the context window and max output tokens?

The context window is the total budget for one request: the prompt, the history, tool definitions, documents and the reply itself, plus reasoning tokens on models that think. Max output is a separate cap on the reply alone, which must still fit inside the window. GPT-4o's reply is capped at 16,384 tokens inside a 128,000-token window; Claude Opus 5.5's at 128,000 inside 1,000,000.

What happens when an API request exceeds the context window?

On the OpenAI Responses API the request fails with a 400 error by default, or the oldest items are dropped if truncation is set to auto. On the Anthropic API an oversized prompt returns a 400 "prompt is too long"; on Claude 4.5 and newer a reply that runs out of room stops with stop_reason: "model_context_window_exceeded". On the Gemini API an oversized input returns a 400 naming the token count and the limit.

What happens when a ChatGPT conversation gets too long?

ChatGPT caps each plan below the model's API window, for example 54K tokens on Plus with the Instant model. Users report that long chats end with a message saying the conversation has reached its maximum length and offering a new chat. OpenAI does not document whether ChatGPT trims or summarises older turns before that point. Claude, by contrast, summarises earlier messages automatically when code execution is enabled.

Does a bigger context window replace long-term memory?

A bigger context window does not replace long-term memory. A context window only holds what is sent on the current request and is empty again on the next session unless the application re-sends it, at full token cost each time and, past the cliffs above, at a higher rate. Long-term memory stores what matters outside the model and retrieves a small relevant slice into the window when needed, which is what Maximem Synap does for AI agents.

Sources, retrieved 28 October 2026 unless noted: OpenAI, models; OpenAI, GPT-4o; OpenAI, GPT-6 Astra; OpenAI, GPT-6.1 Sol; OpenAI, GPT-6.1 Terra; OpenAI, GPT-6 Luna; OpenAI, GPT-4.1; OpenAI, deprecations; OpenAI, retiring GPT-4o in ChatGPT; OpenAI, conversation state; OpenAI, compaction; OpenAI, Responses API reference; ChatGPT pricing; OpenAI developer forum, maximum length thread (read 26 September 2026); Anthropic, models overview; Anthropic, Claude Haiku 4.5; Anthropic, pricing; Anthropic, context windows; Anthropic, compaction; Anthropic, model deprecations; Claude Help Center, usage and length limits; Google, Gemini models; Google, Gemini 4 Argon; Google, long decode; Google, Gemini 3.8 Flash; Google, Gemini 3.1 Pro; Google, Gemini pricing; Google, Gemini Apps limits; Gemini CLI issue 11248 (read 26 September 2026); xAI, models; xAI, Grok 4.7; DeepSeek, models and pricing; Mistral, models; Mistral, Large 4; Meta, Model API models; Meta, pricing and rate limits; Meta, Llama 4 model card; Anthropic, Introducing 100K context windows; Google, Gemini 1.5 announcement; Liu et al., Lost in the Middle; Chroma, Context Rot; Chen et al., Position Interpolation; Wu et al., LongMemEval; Maximem, Agentic Context Management.

From the team at Maximem

Stop rebuilding agent memory from scratch

Maximem Synap is the context management layer we built after hitting every problem in this post ourselves. Persistent recall across sessions, entity resolution and conscious forgetting, in Python, TypeScript and REST.

Related posts

Looking for more to read? See our directory of the best engineering blogs to follow.