opendunes
Evaluate and optimise
Copy page ▾

Opus 5

Move an app from Claude Opus 4.8 to Claude Opus 5: the model IDModel IDThe name a request calls a model by, lab/model, copied from Models.More on Models → changes, and reasoning turns on by default.

  1. Change the model ID.
  2. Update the request.
  3. Read the answer.
  4. Set the effort.
  5. Compare before you switch.

1. Change the model ID

FromTo
Model IDanthropic/claude-opus-4.8anthropic/claude-opus-5
Context1 000 000 tokens1 000 000 tokens
Longest answer128 000 tokens128 000 tokens
Reasoningoff unless you ask: default_enabled is falseon unless you turn it off: default_enabled is true
Effort levelslow · medium · high · xhigh · maxthe same five

GET /v1/model/{lab}/{model} answers each model's entry: its context, its longest answer, its reasoning. The request keeps its shape; model changes.

JSON
{
  "model": "anthropic/claude-opus-5",
  "messages": [
    {
      "role": "user",
      "content": "Summarise this contract in five points."
    }
  ]
}

2. Update the request

You send todayOn Opus 5Send instead
no reasoning settingthe model reasonsnothing, or reasoning turned off, as below
reasoning off, with effort xhigh or maxrefusedreasoning on at those levels, or effort high or lower

To keep Opus 4.8's behaviour, turn reasoning off in the request, at effort high or lower.

RouteReasoning off
/v1/chat/completionsreasoning: {"enabled": false}
/v1/messagesthinking: {"type": "disabled"}
JSON
{
  "model": "anthropic/claude-opus-5",
  "reasoning": {
    "enabled": false,
    "effort": "high"
  },
  "messages": [
    {
      "role": "user",
      "content": "Summarise this contract in five points."
    }
  ]
}

Two additions, both on /v1/messages and both in beta at Anthropic, keep the start of the conversation unchanged, so a cached prompt stays cached: see Caching.

ToAdd
change the effort for one turna system message with empty content and output_config.effort, before that turn
add or remove a tool mid-conversationa system message holding a tool_addition or tool_removal block that names the tool

3. Read the answer

With reasoning on, every answer carries it, and the reasoning shares the ceiling with the reply.

RouteWhere the reasoning landsChange
/v1/chat/completionschoices[0].message.reasoning, counted in usage.completion_tokens_details.reasoning_tokensraise max_tokens: too low a ceiling ends with no text
/v1/messagesthinking blocks, ahead of the text blockread blocks by type, never content[0]; send thinking blocks back unchanged with tool results

Reasoning also takes time before the first word: check your timeouts. Both routes: Chat · Messages.

4. Set the effort

RouteField
/v1/chat/completionsreasoning.effort, or reasoning_effort
/v1/messagesoutput_config.effort

Anthropic gives high as the default. Set the level in every request: lower it where answers hold, and use xhigh for long coding and agent work.

Good to know

At xhigh or max, Anthropic's advice is a max_tokens of 64 000 to start: the reasoning and the reply both fit.

5. Compare before you switch

Send the same set of real prompts to both IDs, and compare three things.

CompareWhere
the answersyour own check: a test suite, a reviewer, the task's pass rate
what each costusage.cost, in DADAThe Algerian dinar, the one currency the docs show.More on Balance and charges →, on every answer
how much each reasonedusage.completion_tokens_details.reasoning_tokens

The script sends one task three ways and prints one line per run: how the answer ended, what the prompt counted, what the model reasoned, and the charge in DA, then the first words of the answer.

RunModelReasoning
oldMODELno setting: the model's own default
new, defaultCANDIDATEno setting: the model's own default
new, offCANDIDATEoff, at effort high
import os
from openai import OpenAI

API_KEY = os.environ["OPENDUNES_API_KEY"]
BASE_URL = "https://opendunes.com/v1"
MODEL = "anthropic/claude-sonnet-4.5"
CANDIDATE = "anthropic/claude-sonnet-4.5"
MAX_TOKENS = 8000
TASK = (
    "Summarise this contract in five points.\n\n"
    "The supplier delivers 200 kilos of dates to Biskra each month. "
    "Payment is due 30 days after delivery, and a late payment adds "
    "a fee. Either side may end the contract with 60 days' notice."
)
DEFAULT = {}
OFF = {"reasoning": {"enabled": False, "effort": "high"}}
RUNS = [
    ("old", MODEL, DEFAULT),
    ("new, default", CANDIDATE, DEFAULT),
    ("new, off", CANDIDATE, OFF),
]

client = OpenAI(base_url=BASE_URL, api_key=API_KEY)

for label, model, fields in RUNS:
    reply = client.chat.completions.create(
        model=model,
        max_tokens=MAX_TOKENS,
        messages=[{"role": "user", "content": TASK}],
        extra_body=fields,
    )
    usage = reply.usage
    details = usage.completion_tokens_details
    thought = details.reasoning_tokens if details else 0
    print(
        f"{label:13} {reply.choices[0].finish_reason:7}",
        f"in {usage.prompt_tokens}",
        f"thought {thought}",
        f"cost {usage.cost}",
    )
    print("   ", (reply.choices[0].message.content or "")[:60])

The samples put anthropic/claude-sonnet-4.5 in both seats, so they run as they stand. Set MODEL to anthropic/claude-opus-4.8 and CANDIDATE to anthropic/claude-opus-5.

The first two lines differ in the model alone: thought shows the change of default, from none to some. The third line is Opus 4.8's behaviour kept on Opus 5, at an effort high or lower.

Switch once the new ID holds; going back is the same one-line change. Run your red-team suite on the new ID too: Red teaming.

Last modified on