Skip to content
Qwen4-Max Migration: Audit the 60% Task Cost Claim — ContentBuffer guide

Qwen4-Max Migration: Audit the 60% Task Cost Claim

K
Kodetra Technologies··16 min read Intermediate

Summary

Move to qwen4-max today, dodge 5 API traps, and measure its cost per task on your own work.

Alibaba shipped Qwen4-Max to general availability on Model Studio today, and the headline number travelling around Reddit, X and the tech press is a big one: average cost per task down by more than 60% versus Qwen3.8-Max. At $1.50 per million input tokens and $4.50 per million output tokens (Singapore list price), with a 1M-token context window, it is priced well under the closed frontier models it is being compared against.

Here is the catch nobody puts in the tweet. That 60% comes from Alibaba's own internal benchmark, Work360, and most of the saving comes from the model thinking less per task, not from cheaper tokens. DataCamp's breakdown of the launch chart puts Work360 average task cost at $4.43 for Qwen3.8-Max and $1.67 for Qwen4-Max, with roughly 35% fewer tokens at the High effort setting. Whether you see anything like that depends entirely on your prompts.

So this guide does two things. First, it walks you through moving an existing Qwen (or any OpenAI-compatible) integration onto qwen4-max without falling into the five API changes that will quietly cost you money or truncate answers. Second, it gives you a small, runnable audit harness that measures pass rate, output tokens, thinking share and cost per solved task at every effort level, so you can check the claim on your own workload before you flip production traffic.

What you will build

  • A first qwen4-max call through the OpenAI Python SDK, reading the answer, the thinking text and the token usage.
  • A migrate_kwargs() helper that rewrites Qwen3.x-era request arguments for Qwen4-Max and tells you what it changed.
  • qwen4_audit.py: a harness that runs graded tasks across off, low, high and xhigh and prints a cost table.
  • A decision rule for picking the cheapest effort level that still clears your quality bar.

Prerequisites

  • Python 3.10+ and pip install openai (tested with openai 3.51.0).
  • An Alibaba Cloud Model Studio API key, exported as DASHSCOPE_API_KEY. New Singapore-region accounts get a 1M-token free quota for 90 days, which is plenty for this audit.
  • Your region's OpenAI-compatible base URL. The legacy Singapore host https://dashscope-intl.aliyuncs.com/compatible-mode/v1 still works; the newer workspace hosts look like https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 (swap the region for us-east-1, eu-central-1, ap-northeast-1, cn-beijing or cn-hongkong).
  • A handful of real tasks from your app with answers you can check in code. Five to twenty is enough to start.

Step 1: Know what actually changed

Before touching code, here are the facts from Alibaba's official Qwen4-Max model page that matter for a migration. Everything below was checked against the Model Studio docs dated November 16, 2026.

SettingQwen4-Max behaviourWhy it matters
Model IDqwen4-maxThe preview ID qwen4-max-preview is reported to retire after Nov 25
ThinkingOn by default (enable_thinking: true)Old calls that assumed fast non-thinking replies now pay for reasoning tokens
Effort valueslow, high, xhigh (default high)medium maps to high, minimal to low, max to xhigh
Thinking budgetDefault 131,072 tokensUse effort or a budget, not both
Output cap131,072 non-thinking; 262,144 thinking + answermax_tokens now has to hold the reasoning too
Context1,000,000 tokensMax input is slightly lower in thinking mode (983,616)
Price (Singapore)$1.50 in / $4.50 out per 1M; same for thinking and non-thinkingThinking tokens bill at the output rate
Cache read$0.075 per 1M (Singapore)Long shared prefixes get very cheap

The big one is the second row. If your Qwen3.x code never mentioned thinking, it now gets thinking at high effort on every call. That is great for hard problems and a waste of money on simple classification or extraction.

Step 2: Make your first call

Qwen4-Max speaks the OpenAI Chat Completions protocol (it also supports OpenAI Responses, Anthropic Messages and DashScope's native format). With the official openai SDK you only change the base URL and the model name. reasoning_effort is a standard SDK argument; Qwen-only switches such as enable_thinking go in extra_body.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DASHSCOPE_API_KEY"],
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Singapore
)

resp = client.chat.completions.create(
    model="qwen4-max",
    messages=[{"role": "user", "content": "Ana is free Thu 13:00-16:00, Ben Thu 14:00-17:00, "
               "Cara Thu 10:00-15:00. Earliest shared 1-hour slot? Answer '<Day> HH:MM'."}],
    reasoning_effort="low",          # low | high (default) | xhigh
    max_completion_tokens=16384,     # thinking + answer share this budget
)

msg = resp.choices[0].message
print("answer:   ", msg.content)
print("thinking: ", (getattr(msg, "reasoning_content", None) or "")[:120], "...")
u = resp.usage
print("usage:    ", u.prompt_tokens, "in /", u.completion_tokens, "out",
      "| reasoning:", getattr(u.completion_tokens_details, "reasoning_tokens", None))

The thinking text arrives in a non-standard reasoning_content field on the message, which is why the code reads it with getattr. Token usage follows the OpenAI shape, so completion_tokens is the full billable output (thinking plus answer) and completion_tokens_details.reasoning_tokens is the thinking slice when the server reports it.

When I pointed this exact script at the local stub server used later in this guide (to exercise the code path without spending tokens), the output shape looked like this. The numbers are synthetic; your real run will differ:

answer:    Thu 13:00
thinking:  ... ...
usage:     120 in / 340 out | reasoning: 300

Notice the answer. The correct earliest shared hour is Thu 14:00 (Ana from 13:00, Ben from 14:00, Cara until 15:00). The stub was set up to miss it at low effort on purpose, because that is exactly the failure the audit has to catch: cheaper effort levels save money right up until they start getting things wrong.

Step 3: Rewrite your old request arguments

Most teams have request kwargs scattered around their codebase, tuned for Qwen3.x. Rather than hunting through each call site by hand, route them through a small adapter that applies the Qwen4-Max rules and logs what it changed:

"""Rewrite Qwen3.x-era chat.completions kwargs for qwen4-max."""
EFFORT_MAP = {"minimal": "low", "low": "low", "medium": "high", "high": "high",
              "xhigh": "xhigh", "max": "xhigh"}


def migrate_kwargs(old: dict, want_thinking: bool = True) -> tuple[dict, list[str]]:
    new = dict(old)
    notes = []
    extra = dict(new.pop("extra_body", {}) or {})

    if new.get("model", "").startswith(("qwen3", "qwen-max", "qwen-plus")):
        notes.append(f"model {new['model']} -> qwen4-max")
        new["model"] = "qwen4-max"

    # 1. Thinking is ON by default now. Be explicit either way.
    if not want_thinking:
        extra["enable_thinking"] = False
        new.pop("reasoning_effort", None)
        extra.pop("thinking_budget", None)
        notes.append("thinking disabled explicitly (default is on)")

    # 2. Effort vocabulary is low | high | xhigh. 'medium' silently becomes 'high'.
    if "reasoning_effort" in new:
        mapped = EFFORT_MAP[new["reasoning_effort"]]
        if mapped != new["reasoning_effort"]:
            notes.append(f"reasoning_effort {new['reasoning_effort']} -> {mapped}")
        new["reasoning_effort"] = mapped
        # 3. Pick one control: effort OR budget, never both.
        if extra.pop("thinking_budget", None) is not None:
            notes.append("dropped thinking_budget (using reasoning_effort)")

    # 4. max_tokens now has to hold thinking + answer.
    if "max_tokens" in new:
        mt = new.pop("max_tokens")
        new["max_completion_tokens"] = max(mt, 16384) if want_thinking else mt
        notes.append(f"max_tokens={mt} -> max_completion_tokens={new['max_completion_tokens']}")

    # 5. Hard-coded non-thinking sampling hurts thinking mode; let server defaults apply.
    if want_thinking:
        for k in ("temperature", "top_p", "presence_penalty"):
            if k in new:
                notes.append(f"removed {k}={new.pop(k)} (thinking-mode defaults apply)")

    if extra:
        new["extra_body"] = extra
    return new, notes


if __name__ == "__main__":
    old = {
        "model": "qwen3.8-max",
        "messages": [{"role": "user", "content": "Summarize this ticket."}],
        "max_tokens": 1024,
        "temperature": 0.7,
        "top_p": 0.8,
        "reasoning_effort": "medium",
        "extra_body": {"thinking_budget": 4096},
    }
    new, notes = migrate_kwargs(old)
    print("\n".join("- " + n for n in notes))
    print({k: v for k, v in new.items() if k != "messages"})

Running it on a typical Qwen3.8-Max call prints:

- model qwen3.8-max -> qwen4-max
- reasoning_effort medium -> high
- dropped thinking_budget (using reasoning_effort)
- max_tokens=1024 -> max_completion_tokens=16384
- removed temperature=0.7 (thinking-mode defaults apply)
- removed top_p=0.8 (thinking-mode defaults apply)
{'model': 'qwen4-max', 'reasoning_effort': 'high', 'max_completion_tokens': 16384}

Each rule maps to a documented change. Alibaba's recommended sampling defaults differ by mode: thinking uses temperature 1.0 and top_p 0.95, non-thinking uses 0.7 and 0.8 with presence_penalty 1.5. Carrying non-thinking values into thinking mode is a common source of loopy or repetitive reasoning, so the helper drops them and lets the server defaults apply. If you call with want_thinking=False it keeps your sampling values and sets enable_thinking: False explicitly.

The 16,384 floor on max_completion_tokens is a starting point, not a rule. The audit in the next step reports truncations (finish_reason == "length"), so you can size it from data.


Step 4: Build the cost-per-task audit

Per-token prices tell you very little about what a model costs you. What you pay is tokens per task times price, and what you care about is cost per task that actually came out right. A model that is half the price but fails twice as often is not cheaper. The harness below measures that directly.

Each task has a prompt and a deterministic checker. I used three small ones that mirror common production work: extracting structured data from an invoice, a scheduling problem with a single correct answer, and generating a regex that has to accept and reject specific strings. Swap in your own.

"""Audit Qwen4-Max cost per task on YOUR workload, across reasoning efforts.

Usage:
  export DASHSCOPE_API_KEY=sk-...
  export QWEN_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1
  python qwen4_audit.py --models qwen4-max --efforts low high xhigh --runs 3
"""
import argparse
import json
import os
import re
import statistics
import time

from openai import OpenAI

# USD per 1M tokens, (input, output). Output price covers thinking + answer.
# qwen4-max: Singapore list price from the Model Studio pricing page (Nov 2026).
# Add your baseline model's row from the same page before comparing.
PRICES = {
    "qwen4-max": (1.50, 4.50),
}

client = OpenAI(
    api_key=os.environ["DASHSCOPE_API_KEY"],
    base_url=os.environ.get(
        "QWEN_BASE_URL", "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
    ),
)


# ---- Tasks: each one has a prompt and a deterministic checker -------------
def check_json_invoice(text):
    m = re.search(r"\{.*\}", text, re.S)
    if not m:
        return False
    try:
        d = json.loads(m.group(0))
    except json.JSONDecodeError:
        return False
    return d.get("vendor") == "Brightline Supply" and abs(float(d.get("total", 0)) - 1847.25) < 0.01


def check_schedule(text):
    return re.search(r"\b(?:Thursday|Thu)\b", text, re.I) is not None and "14:00" in text


def check_regex(text):
    m = re.search(r"`([^`]+)`", text)
    if not m:
        return False
    try:
        pat = re.compile(m.group(1))
    except re.error:
        return False
    good = ["INV-2026-00042", "INV-1999-12345"]
    bad = ["INV-26-00042", "inv-2026-00042", "INV-2026-0042", "XINV-2026-00042"]
    return all(pat.fullmatch(g) for g in good) and not any(pat.fullmatch(b) for b in bad)


TASKS = [
    {
        "id": "invoice-json",
        "prompt": (
            "Extract vendor and grand total as JSON {\"vendor\": str, \"total\": number}.\n"
            "INVOICE  Brightline Supply  #A-7781\n"
            "12 x cable trays @ 89.50 = 1074.00\n3 x mounting kits @ 211.75 = 635.25\n"
            "Freight 138.00\nReply with the JSON only."
        ),
        "check": check_json_invoice,
    },
    {
        "id": "meeting-slot",
        "prompt": (
            "Ana is free Tue 09:00-11:00 and Thu 13:00-16:00. Ben is free Wed all day "
            "and Thu 14:00-17:00. Cara is free Thu 10:00-15:00. Find the earliest "
            "1-hour slot all three share. Answer as '<Day> HH:MM'."
        ),
        "check": check_schedule,
    },
    {
        "id": "invoice-regex",
        "prompt": (
            "Write a Python regex that fully matches IDs like INV-2026-00042: literal "
            "'INV-', a 4-digit year, '-', exactly 5 digits. Return only the pattern "
            "wrapped in single backticks."
        ),
        "check": check_regex,
    },
]


def run_once(model, effort, task):
    kwargs = dict(
        model=model,
        messages=[{"role": "user", "content": task["prompt"]}],
        max_completion_tokens=32768,  # covers thinking + answer on qwen4-max
    )
    if effort == "off":
        kwargs["extra_body"] = {"enable_thinking": False}
    else:
        kwargs["reasoning_effort"] = effort  # low | high | xhigh
    t0 = time.time()
    resp = client.chat.completions.create(**kwargs)
    latency = time.time() - t0

    msg = resp.choices[0].message
    answer = msg.content or ""
    u = resp.usage
    details = getattr(u, "completion_tokens_details", None)
    reasoning = getattr(details, "reasoning_tokens", None) or 0
    pin, pout = PRICES[model]
    cost = u.prompt_tokens / 1e6 * pin + u.completion_tokens / 1e6 * pout
    return {
        "passed": bool(task["check"](answer)),
        "prompt_tokens": u.prompt_tokens,
        "completion_tokens": u.completion_tokens,
        "reasoning_tokens": reasoning,
        "finish_reason": resp.choices[0].finish_reason,
        "cost": cost,
        "latency": latency,
    }


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--models", nargs="+", default=["qwen4-max"])
    ap.add_argument("--efforts", nargs="+", default=["low", "high", "xhigh"])
    ap.add_argument("--runs", type=int, default=3)
    ap.add_argument("--out", default="audit_results.jsonl")
    args = ap.parse_args()

    rows = []
    with open(args.out, "w") as f:
        for model in args.models:
            if model not in PRICES:
                raise SystemExit(f"Add a PRICES row for {model} first.")
            for effort in args.efforts:
                for task in TASKS:
                    for i in range(args.runs):
                        r = run_once(model, effort, task)
                        r.update(model=model, effort=effort, task=task["id"], run=i)
                        rows.append(r)
                        f.write(json.dumps(r) + "\n")

    print(f"{'model':<12}{'effort':<7}{'pass':>6}{'out_tok':>9}{'think%':>8}"
          f"{'$/task':>10}{'$/solved':>10}{'p50 s':>7}")
    for model in args.models:
        for effort in args.efforts:
            g = [r for r in rows if r["model"] == model and r["effort"] == effort]
            passed = sum(r["passed"] for r in g)
            out_tok = statistics.mean(r["completion_tokens"] for r in g)
            think = sum(r["reasoning_tokens"] for r in g) / max(1, sum(r["completion_tokens"] for r in g))
            cost = sum(r["cost"] for r in g)
            per_task = cost / len(g)
            per_solved = cost / passed if passed else float("inf")
            p50 = statistics.median(r["latency"] for r in g)
            truncated = sum(r["finish_reason"] == "length" for r in g)
            flag = f"  ({truncated} truncated)" if truncated else ""
            print(f"{model:<12}{effort:<7}{passed:>3}/{len(g):<2}{out_tok:>9.0f}{think:>8.0%}"
                  f"{per_task:>10.5f}{per_solved:>10.5f}{p50:>7.2f}{flag}")


if __name__ == "__main__":
    main()

A few design choices worth calling out:

  • Graders are code, not another LLM. An LLM judge adds its own cost and noise. If a task can't be checked in code, rewrite it until it can, even if that means asking for JSON.
  • off is a real effort level. It sends enable_thinking: False and no reasoning_effort. For extraction-style tasks it is often the winner.
  • Cost per solved task divides total spend by passes. That single number is what you compare against Alibaba's 60% claim.
  • Raw rows go to JSONL so you can slice by task later and see which ones need more thinking.
  • Prices are a dict you own. Only the qwen4-max row is filled in. Add your baseline model's row from the official pricing page for your region before comparing; the script refuses to run a model without one.

Step 5: Dry-run it offline, then run it for real

Before spending real tokens, I ran the harness against a tiny local stub that mimics the Chat Completions response shape, including reasoning_content and completion_tokens_details. This catches bugs in graders and parsing for free. The stub's token counts are made up; they demonstrate the table, not Qwen4-Max.

"""Offline stub of an OpenAI-compatible /chat/completions endpoint.
Used ONLY to dry-run the audit harness without spending tokens.
Token counts here are synthetic; they are not Qwen4-Max measurements."""
import json
from http.server import BaseHTTPRequestHandler, HTTPServer

ANSWERS = {
    "INVOICE": '{"vendor": "Brightline Supply", "total": 1847.25}',
    "Ana is free": "Thu 14:00",
    "regex": "`INV-\\d{4}-\\d{5}`",
}
THINK = {"off": 0, "low": 300, "high": 1400, "xhigh": 3800}


class H(BaseHTTPRequestHandler):
    def log_message(self, *a):
        pass

    def do_POST(self):
        body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))
        prompt = body["messages"][-1]["content"]
        effort = body.get("reasoning_effort") or ("off" if body.get("enable_thinking") is False else "high")
        answer = next(v for k, v in ANSWERS.items() if k in prompt)
        if effort in ("off", "low") and prompt.startswith("Ana"):
            answer = "Thu 13:00"  # simulate a shallow-reasoning miss
        think = THINK[effort]
        out = {
            "id": "stub", "object": "chat.completion", "created": 0, "model": body["model"],
            "choices": [{"index": 0, "finish_reason": "stop",
                         "message": {"role": "assistant", "content": answer,
                                     "reasoning_content": "..." if think else None}}],
            "usage": {"prompt_tokens": 120, "completion_tokens": think + 40, "total_tokens": think + 160,
                      "completion_tokens_details": {"reasoning_tokens": think}},
        }
        data = json.dumps(out).encode()
        self.send_response(200)
        self.send_header("Content-Type", "application/json")
        self.send_header("Content-Length", str(len(data)))
        self.end_headers()
        self.wfile.write(data)


HTTPServer(("127.0.0.1", 8765), H).serve_forever()
python stub_server.py &
DASHSCOPE_API_KEY=stub QWEN_BASE_URL=http://127.0.0.1:8765 \
  python qwen4_audit.py --efforts off low high xhigh --runs 2

Output from that dry run:

model       effort   pass  out_tok  think%    $/task  $/solved  p50 s
qwen4-max   off      4/6        40      0%   0.00036   0.00054   0.00
qwen4-max   low      4/6       340     88%   0.00171   0.00257   0.00
qwen4-max   high     6/6      1440     97%   0.00666   0.00666   0.00
qwen4-max   xhigh    6/6      3840     99%   0.01746   0.01746   0.00

The pattern this table is built to expose is the interesting part: off and low are cheaper per task, but they also miss the scheduling question, so cost per solved task climbs. xhigh solves everything that high does at more than twice the price. In this synthetic case high is the floor that clears the bar, and anything above it is wasted.

Then drop the stub and point the same command at Model Studio:

export DASHSCOPE_API_KEY=sk-...
export QWEN_BASE_URL=https://dashscope-intl.aliyuncs.com/compatible-mode/v1
python qwen4_audit.py --models qwen4-max --efforts off low high xhigh --runs 3

Worked example: auditing a support-ticket pipeline

Here is how I would apply this to a realistic workload: a support pipeline that does three jobs per ticket, namely classify the ticket into one of eight queues, extract order ID and product as JSON, and draft a reply that must cite the correct refund-policy clause.

  1. Collect 20 real tickets per job with known-good labels. For the reply job, the checker verifies the cited clause number with a regex rather than judging the prose.
  2. Add those 60 tasks to TASKS, each with its checker. Keep the prompts byte-for-byte identical to production so prefix caching behaves the same.
  3. Add a row for your current model to PRICES using the official pricing page, then run --models with both models and --runs 3. Three runs per task gives you a feel for variance without blowing the free quota.
  4. Read the table per job, not overall. Slice audit_results.jsonl by task prefix. Classification and extraction typically pass at off or low; the policy-citation reply is where effort earns its keep.
  5. Route by job. Send each job with the cheapest effort level that hit your pass bar. That per-job routing, not a single global setting, is where most of the real savings come from.

Slicing the JSONL is a few lines of pandas:

import pandas as pd

df = pd.read_json("audit_results.jsonl", lines=True)
df["job"] = df["task"].str.split("-").str[0]
summary = (df.groupby(["model", "job", "effort"])
             .agg(pass_rate=("passed", "mean"),
                  out_tok=("completion_tokens", "mean"),
                  spend=("cost", "sum"),
                  solved=("passed", "sum")))
summary["usd_per_solved"] = summary["spend"] / summary["solved"]
print(summary.sort_values("usd_per_solved").round(5))

If your Qwen4-Max cost per solved task comes in near 40% of your current model's, the launch claim holds for you. If it lands at 80% or 100%, that's still useful: you have learned your tasks were already short, and the bigger lever is turning thinking off where it doesn't help.


Common pitfalls and gotchas

1. Paying for thinking you never asked for

Because enable_thinking defaults to true, a plain migration (just change the model string) turns every call into a reasoning call at high effort. On a classification endpoint that can multiply output tokens many times over. Decide per endpoint and set it explicitly.

2. Assuming medium is a cheaper middle ground

There is no medium on Qwen4-Max. It maps to high, so code that was carefully tuned to medium on another model is now running at the default level. The same goes for max, which quietly becomes xhigh, the most expensive setting.

3. Truncated answers from an old max_tokens

For qwen4-max, the token limit covers chain of thought plus the answer. A 1,024-token cap that was fine for a non-thinking model can be eaten entirely by reasoning, leaving an empty or cut-off content. Alibaba recommends max_completion_tokens over the deprecated max_tokens. Always check finish_reason; the harness flags length stops for you.

4. Sending effort and budget together

reasoning_effort and thinking_budget are two ways to control the same thing. Pick one. Effort is the more portable choice because the same vocabulary works across the Chat Completions, Responses (reasoning.effort) and Anthropic Messages (output_config.effort) endpoints.

5. Putting Qwen-only flags at the top level of the Python call

The OpenAI SDK rejects unknown keyword arguments, so enable_thinking=False passed directly to create() raises a TypeError. Put it in extra_body. With raw curl you send it as a top-level JSON field.

6. Comparing per-token prices instead of per-task cost

A model that writes 3x more reasoning at a lower token price can easily cost more per task. The Work360 figures Alibaba published are specifically per-task averages, and DataCamp noted the cost drop is larger than token reduction times price alone would explain, which Alibaba has not fully accounted for. That's a good reason to measure rather than multiply.

7. Treating benchmark wins as workload wins

Alibaba's chart shows Qwen4-Max leading on Agents' Last Exam v1.1 (46.7) but trailing several rivals on Terminal-Bench 4.0 (48.5) and Humanity's Last Exam (51.7). Independent trackers put it ninth on the Artificial Analysis Intelligence Index. It is a strong, cheap model, not a universal winner. Your graded tasks are the benchmark that counts.

8. Forgetting cache economics on long prompts

Cache reads cost $0.075 per million tokens in Singapore versus $1.50 for fresh input, but explicit cache writes cost more than normal input ($1.875 for a 5-minute TTL, $3 for 1 hour). For a long, stable system prompt, caching pays off after a couple of hits. For one-off prompts it is pure overhead. Keep your audit prompts identical to production so cache behaviour in the audit matches reality.

9. Running the audit once

Thinking-mode sampling runs at temperature 1.0, so a single pass per task is noisy. Use at least three runs per task and look at the pass rate, not individual results.


Quick reference

TaskHow to do it on qwen4-max
Model IDmodel="qwen4-max"
Base URL (Singapore, legacy)https://dashscope-intl.aliyuncs.com/compatible-mode/v1
Turn thinking offextra_body={"enable_thinking": False}
Set effortreasoning_effort="low" | "high" | "xhigh"
Cap total outputmax_completion_tokens=N (thinking + answer)
Read thinking textgetattr(msg, "reasoning_content", None)
Read thinking tokensusage.completion_tokens_details.reasoning_tokens
Spot truncationchoices[0].finish_reason == "length"
Thinking sampling defaultstemperature 1.0, top_p 0.95, top_k 20
Non-thinking sampling defaultstemperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5
Price, Singapore$1.50 in / $4.50 out per 1M tokens; cache read $0.075
Context / max thinking+answer1,000,000 / 262,144 tokens

Next steps

  • Replace the three sample tasks with 20 or more graded tasks per production job and run the audit across off, low, high and xhigh.
  • Add your current model to PRICES and compare cost per solved task side by side. That is your personal version of the 60% number.
  • Wire the winning effort per job into your router and keep the audit in CI so a silent model update shows up as a pass-rate drop, not a customer complaint.
  • If you have long shared prompts, try prompt_cache_options with the 5-minute and 1-hour TTLs and re-run the audit to see the cache-read savings.
  • Try the same harness against the Anthropic Messages endpoint with output_config.effort if your stack already uses the Anthropic SDK.

Sources

Comments

Subscribe to join the conversation...

Be the first to comment

Found this useful?

Get new AI guides for builders by email. Free.

Join 3,594 builders reading daily.

Also get