llmcloud.ai
Solutions · Long context

Best LLMs for long context

200K to 2M token windows for repos, filings, and transcripts.

Long-context routes evaluate RULER @128K, needle-in-a-haystack at depth, and effective recall — not just the marketing window size. Use auto:long-context when your prompt exceeds 100K tokens; the router excludes models whose accuracy collapses past 64K.

#ModelScoreRULER @128KWhy
1gemini-3.1-pro9894.7%2M window with the best effective recall at depth.
2gemini-2.5-pro9592.1%Cheaper 2M-window option; nearly identical recall to 3.1.
3gpt-4.19289.8%1M window, strong RULER, excellent prompt caching.
4claude-opus-4.59088.4%200K window but best-in-class accuracy end-to-end.
5claude-sonnet-4.58887.1%Best $/M-input under 200K for RAG replacements.
6gemini-3.6-flash8584.0%1M window at $0.30/M — the value pick for doc Q&A.
7gpt-4.1-mini8281.5%1M window, cheapest OAI long-context.
8qwen3-235b-a22b7876.9%Open MoE with 256K native; self-hostable.
9llama-4-maverick7674.2%10M-window Maverick; recall drops past 500K.
10deepseek-v47472.5%128K, cheapest capable long-context on the roster.

Why these models

  • RULER benchmark at 32K, 128K, and 512K depths — not marketing window size.
  • $/1M input tokens and prompt-cache hit rate matter more than output speed.
  • Preference for models with prompt caching support to amortize document re-reads.

Drop-in example

const res = await client.chat.completions.create({
  model: "auto:long-context",
  messages: [
    { role: "system", content: "Answer strictly from the document." },
    { role: "user", content: repoContents /* ~800K tokens */ + "\n\nQ: which module handles auth?" },
  ],
});