opendunes
Evaluate and optimise
Copy page ▾

Claude 4.6

Move an app from Claude Opus 4.5 or Sonnet 4.5 to Claude 4.6: the model IDModel IDThe name a request calls a model by, lab/model, copied from Models.More on Models → changes, and the model now decides how long it thinks.

  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
Opusanthropic/claude-opus-4.5anthropic/claude-opus-4.6
Sonnetanthropic/claude-sonnet-4.5anthropic/claude-sonnet-4.6
Context, Opus200 000 tokens1 000 000 tokens
Context, Sonnet1 000 000 tokens1 000 000 tokens
Longest answer64 000 tokens128 000 tokens
Effort levelsnone listedlow · medium · high · max
supported_parameters added—reasoning_effort; Opus adds top_p, Sonnet adds verbosity

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

JSON
{
  "model": "anthropic/claude-opus-4.6",
  "reasoning": {
    "enabled": true,
    "effort": "high"
  },
  "messages": [
    {
      "role": "user",
      "content": "Compare these two supplier quotes and pick one."
    }
  ]
}

2. Update the request

You send todayOn Claude 4.6Send instead
a last assistant turn that starts the answer for the modelrefusedthe instruction in the system prompt, or Structured outputs for a fixed shape
a thinking budget: reasoning.max_tokens or thinking.budget_tokensstill taken; Anthropic marks it deprecatedreasoning on, with an effort level
tool arguments read as a raw stringthe escaping can differread them with a JSON parser
RouteAdaptive reasoning
/v1/chat/completionsreasoning: {"enabled": true}, with reasoning.effort
/v1/messagesthinking: {"type": "adaptive"}, with output_config.effort
Don't

End the conversation on an assistant turn to force how the answer opens. Claude 4.6 refuses it.

Do

End on a user turn, and say in the system prompt how the answer must open.

3. Read the answer

With adaptive reasoning, the model spends more on a hard question and less on an easy one. The reasoning shares the ceiling with the reply.

RouteWhere the reasoning lands
/v1/chat/completionschoices[0].message.reasoning, counted in usage.completion_tokens_details.reasoning_tokens
/v1/messagesthinking blocks, ahead of the text block

Read blocks by type, never content[0], and send thinking blocks back unchanged with tool results. Both routes: Chat · Messages.

4. Set the effort

Effort is new on Claude 4.6, and max is its top level.

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

Set the level in every request rather than rely on a default. Start at high; lower it where answers hold, and keep max for work where your checks show a gain.

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 an easy question and a hard one, each to the old ID and then to the new ID at every effort level, 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. Adaptive reasoning shows in thought: more on the hard question, less on the easy one.

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"
EFFORTS = ["low", "medium", "high", "max"]
MAX_TOKENS = 16000
PROMPTS = {
    "easy": "What is the capital of Algeria?",
    "hard": (
        "Three trucks leave Oran for Constantine, which is 430 km "
        "away, at 06:00, 07:30 and 09:00, at 60, 72 and 90 km/h. "
        "Which arrives first, and when does each arrive?"
    ),
}
RUNS = [("old", MODEL, {})] + [
    (effort, CANDIDATE, {"reasoning": {"enabled": True, "effort": effort}})
    for effort in EFFORTS
]

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

for kind, prompt in PROMPTS.items():
    print(kind)
    for label, model, fields in RUNS:
        reply = client.chat.completions.create(
            model=model,
            max_tokens=MAX_TOKENS,
            messages=[{"role": "user", "content": prompt}],
            extra_body=fields,
        )
        usage = reply.usage
        details = usage.completion_tokens_details
        thought = details.reasoning_tokens if details else 0
        print(
            f"{label:7} {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.5 and CANDIDATE to anthropic/claude-opus-4.6, or the same pair of Sonnet IDs.

Read thought down each question. Where high and max cost more and the answers hold no better, keep the lower level: Anthropic's advice is to start at high and keep max for work where your checks show a gain.

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