Claude Opus 5: What 1M Context Changes for Agents

Claude Opus 5 brings 1M token context to Anthropic's most capable model. What this means for agent architectures, cost trade-offs, and when Sonnet 5 is still the better choice.

TL;DR — Claude Opus 5 is Anthropic’s most powerful model with 1M token context window. It excels at complex multi-step reasoning, nuanced analysis, and long-document understanding. But at roughly $15/M input + $75/M output (Opus-tier pricing), it costs 5× more than Sonnet 5. Use it when the task requires reasoning depth that cheaper models cannot provide — and use Sonnet 5 for everything else.

Claude Opus 5 is live on SandBase with a 1,000,000 token context window. That number — a million tokens — sounds like the headline. It is not. The real story is what you can do with a model that reasons at Opus depth over that much context.

What Opus 5 actually is

SpecValue
Context window1,000,000 tokens
ProviderAnthropic
Model classOpus (highest capability tier)
ModalitiesText input, image input, text output
Available on SandBaseYes, via anthropic/claude-opus-5

Opus is Anthropic’s “think harder” tier. It is not faster than Sonnet. It is not cheaper. It exists for tasks where reasoning quality is the binding constraint — where a model that thinks longer and deeper produces a measurably better result.

When 1M context + Opus reasoning matters

Scenario 1: Full codebase analysis

Feed an entire repository (500-800 files, 300K-700K tokens) and ask Opus 5 to identify architectural issues, security vulnerabilities, or propose refactoring strategies.

With 128K models: you chunk the codebase, lose cross-file dependencies, get fragmented analysis. With Opus 5 at 1M: the model sees the entire dependency graph in one pass. It can trace a bug from the API handler through three middleware layers to the database query.

Cost per analysis: 500K input tokens × ~$15/M + 5K output × ~$75/M = $7.88/analysis. Expensive — but a senior engineer spending 4 hours on the same review costs $200+.

Scenario 2: Multi-document legal/financial analysis

A due diligence agent reviews 50 contracts (20K tokens each = 1M total). It needs to find contradictions between documents, identify non-standard clauses, and flag risks that only emerge when cross-referencing multiple agreements.

Chunked approach: loses cross-document references. A non-compete in Document A contradicts a partnership clause in Document B — but if the model never sees both, it cannot flag the conflict.

Opus 5: sees all 50 contracts simultaneously. Cross-references are first-class.

Cost: 1M input × ~$15/M + 10K output × ~$75/M = $15.75/review. For a deal that saves $50K in legal fees, this is trivial.

Scenario 3: Agent orchestration planning

An autonomous agent is given a complex, multi-step task: “Research the top 20 companies in sector X, analyze their hiring patterns, identify which are expanding into AI, and produce a report with investment recommendations.”

The planning step — decomposing this into sub-tasks, identifying data sources, anticipating failures, designing the execution sequence — benefits from Opus-depth reasoning. The execution steps (actually fetching data, formatting outputs) can run on cheaper models.

Pattern: Opus 5 for planning (one call, 5K tokens, $0.08) → Sonnet 5 or mini for execution (many calls, lower cost).

When NOT to use Opus 5

The 5× cost premium over Sonnet 5 is only justified when reasoning depth matters. For these tasks, Sonnet 5 is the right choice:

TaskWhy Sonnet 5 is enough
Code generation (single file)Code quality is comparable; Sonnet is 5× cheaper
Classification / routingSimple decisions don’t need deep reasoning
Summarization (single document)Quality difference is marginal for summaries
Tool use / function callingMechanical task, not reasoning-bound
Conversation (most turns)Only escalate to Opus for unusually complex questions
Data extractionSchema-following doesn’t require Opus depth

The rule: If Sonnet 5 gets it right 95% of the time, the 5% improvement from Opus rarely justifies 5× cost.

Opus 5 vs the 1M-context field

Three models now offer ~1M token context:

ModelContextReasoning depthSpeedCost tier
Claude Opus 51MHighestSlowestHighest ($15+$75/M)
Claude Sonnet 51MHighMediumMid ($3+$15/M est.)
Kimi K31MHigh (emerging)FastLower (competitive)
GPT-5.6 Sol1.05MHighMediumTBD

Opus 5’s differentiator is not the context window — others match it. It is the reasoning depth applied to that context. Opus processes 1M tokens and finds subtle patterns that faster models miss.

For a detailed comparison of Kimi K3 vs Opus 5, see our upcoming Kimi K3 vs Claude Opus 5 article.

How to use it on SandBase

from openai import OpenAI

client = OpenAI(
    base_url="https://api.sandbase.ai/v1",
    api_key="sk-..."
)

response = client.chat.completions.create(
    model="anthropic/claude-opus-5",
    messages=[
        {"role": "system", "content": "You are a senior code reviewer analyzing a full repository."},
        {"role": "user", "content": f"Review this codebase for security issues:\n\n{full_codebase_content}"}
    ],
    max_tokens=8000
)

Same endpoint, same SDK, same auth as every other model on SandBase. The model selection is the only difference.

Cost management strategies for Opus 5

Strategy 1: Opus for planning, cheap models for execution

# Plan with Opus (expensive, one call)
plan = call_model("anthropic/claude-opus-5", "Decompose this task into steps...")

# Execute with Sonnet or mini (cheap, many calls)
for step in plan.steps:
    result = call_model("anthropic/claude-sonnet-5", f"Execute: {step}")

Strategy 2: Escalation routing

def choose_model(task_complexity_score: float):
    if task_complexity_score > 0.8:
        return "anthropic/claude-opus-5"     # Only the hardest 20%
    elif task_complexity_score > 0.4:
        return "anthropic/claude-sonnet-5"   # Middle tier
    else:
        return "openai/gpt-4o-mini"          # Simple tasks

Strategy 3: Cached system prompts

For repeated Opus calls (e.g., iterative code review), Anthropic’s prompt caching at the 1-hour tier reduces input cost by 90% after the first call. A 100K-token codebase cached: first call $1.50, subsequent calls $0.15.

Limitations

  • Speed: Opus is the slowest model in the Claude family. Long-context calls (500K+ tokens) can take 30-60 seconds. Not suitable for real-time user-facing responses.
  • Cost: At Opus-tier pricing, casual use gets expensive fast. A 1M-token input costs ~$15 in input alone.
  • Overkill for most tasks: The majority of agent turns are simple enough for Sonnet or cheaper models. Opus should be a targeted tool, not a default.
  • Output length: Despite 1M input context, max output is still bounded (typically 4K-8K tokens unless extended). Long reports need multiple output calls.

FAQ

Is Opus 5 the best model available in 2026?

For reasoning depth: arguably yes. For cost-efficiency: no. For speed: definitely no. “Best” depends on your constraint. If budget is the constraint, Sonnet 5 is better. If latency matters, Sonnet 5 or GPT-4o is better. If reasoning quality on hard problems is the constraint, Opus 5 is the answer.

Can I feed a 1M-token document to Opus 5?

Yes. The context window is 1,000,000 tokens. But consider: 1M input tokens at ~$15/M = $15 per call. Make sure the task justifies the cost. For most documents, you can extract relevant sections first and send a focused 50-100K prompt.

How does Opus 5 compare to GPT-5.6?

Both are frontier models with ~1M context. Opus 5 is generally stronger at nuanced reasoning and instruction following. GPT-5.6’s variants (Luna/Sol/Terra) optimize for different trade-offs. Direct comparison depends heavily on the specific task. We will publish a detailed GPT-5.6 vs Claude 5 comparison shortly.

Should my agent default to Opus 5?

No. Default to Sonnet 5 or cheaper, and escalate to Opus only for tasks that demonstrably benefit from deeper reasoning. A good heuristic: if the task has multiple correct approaches and you need the model to evaluate trade-offs between them, consider Opus. If the task has one clear correct answer, Sonnet is enough.

For the broader LLM pricing landscape, see our LLM pricing guide. For cost optimization patterns that apply across all models, see per-call vs token pricing.

Key takeaways

  • Opus 5 = deepest reasoning + 1M context, not fastest or cheapest
  • Use it for: multi-document analysis, complex planning, codebase-level review, problems where nuance matters
  • Don’t use it for: classification, extraction, simple generation, most agent turns
  • Cost pattern: Opus for planning (1 call) → Sonnet/mini for execution (many calls)
  • Cache system prompts aggressively — 90% savings on repeated long-context calls
  • The 1M context is shared with Sonnet 5 and Kimi K3; Opus’s unique value is reasoning depth, not window size