claude-opus-5
Claude Opus 5 is Anthropic's model for complex agentic coding and enterprise work, and it thinks by default. Adaptive thinking means the model decides when and how much to reason on each turn rather than waiting to be told, with effort selectable across five levels. Its million-token context window is both the default and the maximum — there is no smaller variant and no long-context surcharge — and instruction following, tool calling, and reasoning stay consistent across the full window. The largest gains over the previous generation are in sustained multi-step analysis, long-horizon agentic work that completes features rather than leaving stubs, and converting additional effort into measurably better results.

Use claude-opus-5 in VS Code, Cursor and Antigravity
DEVUP Code, the DEVUP AI extension, is free to install. Requests are paid from your DEVUP balance.
Claude Opus 5
Anthropic's model for complex agentic coding and enterprise work. Released July 2026.
Three Migration Traps
Anthropic flags two of these as breaking changes. The third produces worse output instead of an error, which makes it the one most likely to go unnoticed.
A response may not start with text
Thinking runs by default here. Earlier Opus models stayed quiet unless asked to reason; this one reasons unless told to stop.
What that changes is the shape of the response. One or more thinking blocks can precede the first
text block, so any code indexing into position zero of the content array finds something it did
not expect.
# Fails when a thinking block comes first
answer = response.content[0].text
# Works regardless of ordering
answer = next(b.text for b in response.content if b.type == "text")At the default display setting those blocks arrive with an empty field — invisible in a quick test, present in production.
Inside tool-use loops, send thinking blocks back untouched alongside the tool results. Editing or dropping them breaks the chain.
Effort and thinking are now coupled
Turning thinking off works only when effort sits at high or lower. Pair thinking: {"type": "disabled"} with xhigh or max and every such request comes back as a 400.
Carrying over a config that did both? Pick one to drop — lower the effort, or delete the thinking field.
Anthropic's advice runs the other way: leave thinking on and manage cost through the effort ladder. Switched off, the model occasionally writes a tool call as plain text rather than emitting a proper tool-use block, or lets internal markup reach the visible answer.
Your old verification prompts now hurt
Worth a second read, because it inverts the usual advice.
Self-verification is built in here. Lines inherited from earlier models — include a final verification step, spawn a subagent to check the work — push the model into checking too much, burning tokens and degrading the result.
A prompt that improved earlier models damages this one. Delete those instructions.
Effort Carries More Weight Here
Five settings: low, medium, high (default), xhigh, max.
Anthropic's framing is that this generation turns extra effort into better answers more reliably than any Opus before it. Which means the dial you pick actually matters now, where before it often did not.
Begin at high and let your own evaluations move it. Down where the quality holds — you save tokens
and time. Up for the work that genuinely resists.
Do not dismiss the lower end. Efficiency at low and medium is listed among the release's
named improvements: strong results at a fraction of the tokens and latency. Code review specifically
holds its accuracy as the effort drops, which makes a review-on-every-commit pipeline affordable
rather than aspirational.
At xhigh and max, give it room. The model spreads work across subagents and tool calls, and a
tight ceiling cuts it off mid-thought.
{
"model": "claude-opus-5",
"max_tokens": 64000,
"output_config": { "effort": "max" },
"messages": [{ "role": "user", "content": "..." }]
}No thinking field appears because none is needed.
One Ceiling, Two Consumers
max_tokens bounds everything the model emits — reasoning and answer together.
Migrating a workload that previously ran without thinking? Expect more output tokens for identical requests, and re-measure before assuming your budget still fits.
An undersized ceiling does not shorten the answer. It cuts the model off while it is still thinking, and you get nothing usable.
Specifications
| Model ID | anthropic/claude-opus-5 |
| Context window | 1,000,000 tokens — default and maximum |
| Max output | 128,000 tokens |
| Thinking | Adaptive, enabled by default |
| Effort levels | low, medium, high (default), xhigh, max |
| Input → output | Text and images → text |
| Reliable knowledge cutoff | May 2026 |
| Released | 24 July 2026 |
| Minimum cacheable prompt | 512 tokens |
One million tokens is not an upgrade you opt into. There is no smaller variant, no beta header, and no surcharge for filling it.
Anthropic publishes no parameter counts, architectural detail, or weights for Claude models.
Capabilities
| Capability | Value |
|---|---|
input_types | text, image |
output_types | text |
audio_input | Not supported |
video_input | Not supported |
context_window | 1000000 |
max_output_tokens | 128000 |
reasoning | Adaptive — enabled by default |
effort_levels | low, medium, high, xhigh, max |
thinking_disable | Only at effort high or below |
streaming | Supported |
tool_calling | Supported |
structured_output | Supported |
prompt_caching | Supported — 512-token minimum |
requires_prompt | Yes — text prompt required, image optional |
What It Does Well
Anthropic names these as the largest gains over the preceding generation.
Deep reasoning that holds across long chains of dependent steps.
Agentic coding over long horizons — extended tool-use loops, multi-file features, substantial refactors, finished end to end. The documentation specifies without leaving stubs or placeholders, and that detail is the one that shows up in practice. A model that stops halfway and writes a TODO comment has not completed the task, however good the first half was.
Test-time compute scaling, which is the mechanism behind effort mattering more.
Bug-finding at a high true-positive rate, with few false alarms, sustained at lower effort levels.
Vision across charts, documents, diagrams, and UI replication — and strongest when the model has tools to crop, zoom, and check its own reading. A visual task without an execution tool leaves capability on the table.
Consistency across the full context window, rather than the familiar pattern where instruction following decays past some fraction of the input.
Spreadsheets and slide decks — multi-sheet workbooks with real formulas, structured presentations.
Subagent teams running writer-verifier patterns without agents trampling each other's output.
Expect Different Behaviour
Things that shift without any code change on your side.
Answers and written deliverables come out longer by default. Agentic sessions include more narration of what the model is doing. Multi-agent setups see more delegation to subagents. And, as covered above, verification happens unprompted.
Each is adjustable through prompting where the default does not fit.
Using Claude Opus 5 on DEVUP AI
Base URL: https://api.devupai.com/v1 · Model ID: anthropic/claude-opus-5
First request — cURL
curl https://api.devupai.com/v1/chat/completions \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-opus-5",
"messages": [
{
"role": "user",
"content": "A CIB payment succeeds at the gateway but the order stays unpaid in our database roughly once per thousand transactions. Rank the possible causes by how well each explains a silent failure with no error logged."
}
],
"max_tokens": 32768
}'Reading the response safely — Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="anthropic/claude-opus-5",
messages=[{"role": "user", "content": question}],
max_tokens=32768,
)
message = response.choices[0].message
trace = getattr(message, "reasoning_content", None)
if trace:
logger.debug("reasoning: %d characters", len(trace))
print(message.content)Keep the two fields apart. Concatenating reasoning into content breaks JSON parsing on structured
paths and shows users a working draft they never requested.
A repository agent — Python
import json
TOOLS = [
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read a file relative to the repository root.",
"parameters": {
"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"],
},
},
},
{
"type": "function",
"function": {
"name": "run_tests",
"description": "Run the test suite and return pass/fail counts with failure output.",
"parameters": {"type": "object", "properties": {}},
},
},
]
def read_file(path: str) -> dict:
"""Replace with your real, sandboxed file access."""
raise NotImplementedError
def run_tests() -> dict:
"""Replace with your real, sandboxed test runner."""
raise NotImplementedError
HANDLERS = {"read_file": read_file, "run_tests": run_tests}
conversation = [
{
"role": "system",
"content": (
"You are working inside a git repository. Make the smallest change that resolves "
"the issue. Run the tests after each edit."
),
},
{
"role": "user",
"content": "Totals ending in .005 round down instead of up. The DZD invoice test catches it. Fix the rounding.",
},
]
TURN_LIMIT = 40
for turn in range(TURN_LIMIT):
reply = client.chat.completions.create(
model="anthropic/claude-opus-5",
messages=conversation,
tools=TOOLS,
max_tokens=32768,
)
message = reply.choices[0].message
conversation.append(message)
if not message.tool_calls:
print(message.content)
break
for call in message.tool_calls:
handler = HANDLERS.get(call.function.name)
if handler is None:
outcome = {"error": "no such tool", "name": call.function.name}
else:
try:
outcome = handler(**json.loads(call.function.arguments or "{}"))
except Exception as exc:
# Failures go back as data. The model works around them; an exception ends the run.
outcome = {"error": type(exc).__name__, "detail": str(exc)}
conversation.append(
{"role": "tool", "tool_call_id": call.id, "content": json.dumps(outcome)}
)
else:
print(f"Halted at the {TURN_LIMIT}-turn limit without finishing.")Two choices in that code are deliberate.
The system prompt says nothing about verification. Adding it would trigger the over-verification described earlier.
The assistant message goes back exactly as it arrived, not reassembled from content. Reasoning
rides along with the object, and rebuilding it by hand quietly throws that away.
TURN_LIMIT is what ends a run that will not end on its own. Nothing else will.
Vision with an execution tool — Python
import base64
with open("dashboard.png", "rb") as handle:
encoded = base64.b64encode(handle.read()).decode("utf-8")
reply = client.chat.completions.create(
model="anthropic/claude-opus-5",
messages=[
{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{encoded}"}},
{
"type": "text",
"text": (
"Report every figure visible here with its label and unit. Where a number "
"is clipped or unreadable, name it as unreadable rather than completing it."
),
},
],
}
],
tools=IMAGE_TOOLS, # crop and zoom helpers, if your scaffold provides them
max_tokens=16384,
)Anthropic documents vision as strongest when the model can crop, inspect, and check its own reading. Supplying those tools is the difference between a description and a verified reading.
Asking it to flag unreadable values rather than complete them is the other half. A clipped number guessed at looks exactly like one read correctly.
Low effort for a review pipeline — Python
reply = client.chat.completions.create(
model="anthropic/claude-opus-5",
messages=[
{"role": "system", "content": "Review this diff. Raise only defects that would fail in production."},
{"role": "user", "content": diff},
],
max_tokens=8192,
extra_body={"output_config": {"effort": "low"}},
)Review accuracy holds as effort drops — documented, and the reason a review-every-commit pipeline is practical here rather than a nice idea.
Node.js — DEVUP AI SDK
npm install devupaiimport DevupAI from "devupai";
const client = new DevupAI({
apiKey: process.env.DEVUP_API_KEY,
});
const reply = await client.chat.completions.create({
model: "anthropic/claude-opus-5",
messages: [
{
role: "system",
content:
"Assess this migration plan. Raise only what could cause data loss or downtime, " +
"each with a severity and the smallest safe correction.",
},
{ role: "user", content: migrationPlan },
],
max_tokens: 32768,
});
console.log(reply.choices[0]?.message?.content);Streaming
stream = client.chat.completions.create(
model="anthropic/claude-opus-5",
messages=[{"role": "user", "content": "Design a webhook delivery retry policy for an unreliable network."}],
max_tokens=32768,
stream=True,
)
for chunk in stream:
if not chunk.choices:
if getattr(chunk, "usage", None):
print(f"\n\nin {chunk.usage.prompt_tokens} / out {chunk.usage.completion_tokens}")
continue
piece = chunk.choices[0].delta
if getattr(piece, "content", None):
print(piece.content, end="", flush=True)Nothing appears until the reasoning phase ends. Lift your client timeouts before shipping a high-effort path — values tuned for non-reasoning models expire while this one is still working, and a cancelled request has already consumed the reasoning it performed.
Prompt Caching
Anything from 512 tokens upward can be cached — lower than the previous generation, so prompts previously too short to qualify now do without any change on your side.
Order matters. Stable material first (system instructions, reference documents, schemas), variable material after, so the cacheable prefix runs as long as possible.
Practical Guidance
Select content blocks by type, never by index.
Keep thinking on; manage cost through the effort ladder instead of switching it off.
Start at high, then let measurement move you.
At xhigh and max, size max_tokens for reasoning plus answer, not answer alone.
Delete verification instructions inherited from earlier models.
Give visual tasks an execution tool where the answer needs checking.
Use the whole context window — it holds across its length, and chunking a large document is usually complexity you do not need.
Put a turn ceiling on every loop.
Limitations
Positional content access breaks. Thinking blocks can precede text, so content[0].text is no
longer safe.
Effort and thinking are coupled. Disabling thinking above high returns an error.
Thinking disabled introduces its own faults — occasional tool calls emitted as text, occasional internal markup in visible output.
Inherited verification prompts backfire, causing over-verification rather than better results.
Reasoning shares the output ceiling. An undersized max_tokens truncates mid-thought.
Text and images only. No audio, no video, no image generation.
Knowledge reaches May 2026. Anything later needs retrieval or a search tool.
Internals are undisclosed — no parameter count, no architecture, no weights.
Default output is longer than earlier models produced. Tune through prompting where that does not suit the application.
Model output is not verified output. Review anything consequential before it acts on a system of record.