The problem: Fable costs twice as much as Opus and you do not know if you need it
You have a task on which the model you usually use does not get to the end, and in the selector there is a more capable model that costs more. The question "which one do I pick" looks like a matter of names, and it is in fact a matter of arithmetic on your own work: you decide it with a set of five to ten tasks taken from your repository, each with an outcome that a command verifies on its own, run on both models, and you compare the cost per successful task, not the price per token. The official documentation advises starting from Opus 5.5 and moving to Fable 5.2 only when your tests at the highest reasoning level are not enough. The advice is reasonable, but it is a starting point: a different outcome is possible, and the same pages report Anthropic measurements in which the more expensive model brought nothing more.
You will not find a verdict between the two models here. I do not have a key to call them and I do not want to write a result I did not obtain: you will find the method, the code that computes the cost per success and takes the decision with a rule written beforehand, and the proof that this code does the right arithmetic on data I wrote. The ingredients you need first are your effort level (Claude Effort and Adaptive Thinking), the way to read the cost of a run (What a Claude Session Costs) and the choice between alias and pinned version (Which Claude Model to Use).
Why the price per token does not answer the question
The price per token tells you what an answer costs, not what a finished job costs. A more capable model can reach the solution in fewer rounds, and this offsets part of the surcharge; a less capable model can fail, and a failed attempt is paid for all the same, then the second attempt is paid for, then what the failure costs downstream. That is why the measure that counts is the total spend divided by the successful tasks. Anthropic's pages on cost optimization say the same thing and add a warning about the tail: in a run of twenty problems, only two problems consumed 43% of the spend. If your test set contains only easy tasks, the cheap model will always win, and the result will tell you nothing about what you need.
For each run you record three things, and each has a precise reason:
- the task, to be able to compare the same job on two models and isolate the tail of the hard tasks;
- the outcome, decided by your verification command and never by the model's judgement of its own work;
- the cost in dollars, read from the JSON of
claude -p, which is an estimate made by the client at list price and not your invoice.
If you remove the outcome, you are left with a spend and you do not know what it bought. If you remove the task, you cannot tell a model that fails on the hard tasks from one that fails at random. If the cost is missing for a run, that run cannot enter the comparison, and the code that follows says so and stops instead of filling the gap with zero.
The method: one run at a time, repeatable
The first piece executes a run. It works on a copy of the task folder, because a model that edits files
must not dirty the original and because every run starts from the same state. The outcome is decided by a command
of yours (verifica), run in the copy after Claude has finished. I discarded the idea of having the
model say "I have finished, the tests pass": that is exactly the judgement we want to measure. The cost comes from
total_cost_usd in the JSON; if it is missing, the function raises an error with the name of the task,
so as not to confuse "zero cost" with "unknown cost".
"""Una prova: stesso compito, modello e livello scelti da te, esito deciso dal TUO comando di verifica."""
import json
import subprocess
import tempfile
import shutil
from pathlib import Path
def argv_claude(prompt, modello, livello, tetto_usd):
"""La riga di comando di una prova, separata dall'esecuzione: si puo' stampare e rileggere."""
return ["claude", "-p", prompt, "--model", modello, "--effort", livello,
"--output-format", "json", "--max-budget-usd", str(tetto_usd),
"--permission-mode", "acceptEdits"]
def prova(compito, modello, livello, tetto_usd=1.00):
"""compito = {'nome', 'cartella', 'prompt', 'verifica': [comando]}. Lavora su una COPIA della cartella."""
with tempfile.TemporaryDirectory() as tmp:
copia = Path(tmp) / "lavoro"
shutil.copytree(compito["cartella"], copia)
giro = subprocess.run(argv_claude(compito["prompt"], modello, livello, tetto_usd),
cwd=copia, capture_output=True, text=True, timeout=3600)
try:
costo = float(json.loads(giro.stdout)["total_cost_usd"])
except (json.JSONDecodeError, KeyError, ValueError, TypeError):
raise RuntimeError(f"{compito['nome']}: nessun total_cost_usd nel JSON, la prova non entra nel confronto")
esito = subprocess.run(compito["verifica"], cwd=copia, capture_output=True, text=True)
return {"compito": compito["nome"], "modello": modello, "riuscita": esito.returncode == 0, "costo_usd": costo}
The command line is built by a function separate from the execution (argv_claude), so you can print it
and reread it before spending. The options are those listed by the help of Claude Code 2.1.325:
--model, --effort, --output-format, --max-budget-usd and
--permission-mode. The cap per run (one dollar in the example) is the protection that counts here: a
task that gets bogged down must not consume the whole budget of the experiment.
I ran this file with a fake claude, a three-line script that prints a JSON with a cost I
wrote myself: it serves to test the code that reads it, it is not a model's answer. What you see below is the real
output of that run.
PATH=$PWD/fakebin:$PATH python3 -I prova_runner.py
# Output:
# claude -p Correggi il bug --model claude-opus-5-5 --effort xhigh --output-format json --max-budget-usd 1.0 --permission-mode acceptEdits
# {'compito': 'c01', 'modello': 'modello-di-prova', 'riuscita': True, 'costo_usd': 0.125}
The first line is the command line of a real run, with the identifier claude-opus-5-5 taken from the
models page; the second is the record the function returns: task, model, outcome, cost. The cost of 0.125 dollars is
the one I wrote into the fake client, and the real outcome derives from the verification on the small test module.
None of this says how a real model behaves.
The rule, written before looking at the data
The second piece turns two sets of runs into a decision. The rule has two numbers that are yours and that the code
forces you to declare: how much one more successful task is worth to you (valore_riuscita_usd) and how
many more successes are needed for the difference not to be noise (minimo_riuscite_in_piu). The value
of a success is not a constant of the model: a success that saves you an hour of work is worth more than one that
saves you a minute. The default threshold, two, is my choice and does not come from the documentation: with ten
runs per model, a single success of difference is explained by the variability from one run to the next, which
Anthropic's pages also cite as a limit of their own measurements.
"""Salire di modello: costo per compito riuscito sullo stesso insieme di prove, con una regola decisa prima."""
from collections import defaultdict
def raggruppa(prove):
"""{modello: {compito: [prove]}}: ogni prova e' un dict con compito, modello, riuscita, costo_usd."""
gruppi = defaultdict(lambda: defaultdict(list))
for p in prove:
gruppi[p["modello"]][p["compito"]].append(p)
return gruppi
def riepilogo(prove):
"""Totali di un modello. Le prove fallite costano comunque: entrano nella spesa, non nelle riuscite."""
spesa = sum(p["costo_usd"] for p in prove)
riuscite = sum(1 for p in prove if p["riuscita"])
return {"prove": len(prove), "riuscite": riuscite, "spesa_usd": round(spesa, 4),
"usd_per_riuscita": round(spesa / riuscite, 4) if riuscite else None}
def compiti_difficili(prove_base):
"""La coda: i compiti su cui il modello di partenza ha fallito almeno una volta."""
falliti = {p["compito"] for p in prove_base if not p["riuscita"]}
return sorted(falliti)
def verdetto(prove_base, prove_salto, valore_riuscita_usd, minimo_riuscite_in_piu=2):
"""Sale solo se le riuscite in piu' valgono, per te, piu' della spesa in piu', e non sono rumore."""
b, s = riepilogo(prove_base), riepilogo(prove_salto)
in_piu = s["riuscite"] - b["riuscite"]
spesa_in_piu = round(s["spesa_usd"] - b["spesa_usd"], 4)
valore = round(in_piu * valore_riuscita_usd, 4)
coda = set(compiti_difficili(prove_base))
riuscite_coda = sum(1 for p in prove_salto if p["compito"] in coda and p["riuscita"])
if in_piu < minimo_riuscite_in_piu:
scelta = "resta"
motivo = f"differenza di {in_piu} riuscite: sotto la soglia di {minimo_riuscite_in_piu}, e' rumore"
elif valore > spesa_in_piu:
scelta = "sale"
motivo = f"{in_piu} riuscite in piu' valgono {valore} USD, la spesa in piu' e' {spesa_in_piu} USD"
else:
scelta = "resta"
motivo = f"{in_piu} riuscite in piu' valgono {valore} USD, la spesa in piu' e' {spesa_in_piu} USD"
return {"scelta": scelta, "motivo": motivo, "base": b, "salto": s, "compiti_in_coda": len(coda),
"riuscite_del_salto_in_coda": riuscite_coda}
def stampa(nome, v):
print(nome)
for chi in ("base", "salto"):
r = v[chi]
print(f" {chi:5} prove={r['prove']:>2} riuscite={r['riuscite']:>2} spesa={r['spesa_usd']:>7} USD/riuscita={r['usd_per_riuscita']}")
print(f" coda: {v['compiti_in_coda']} compiti falliti dal modello base; prove riuscite dal salto su quei compiti: {v['riuscite_del_salto_in_coda']}")
print(f" verdetto: {v['scelta']} - {v['motivo']}")
Three design choices deserve a line. The spend includes the failed runs, because a failure is paid for. The "tail" is defined on the starting model: they are the tasks that it missed at least once, and that is where a jump to another model can be worth something, so I print it separately. The verdict compares money with money: the extra successes, multiplied by how much you value them, against the extra spend. There is no composite score and no "go up" that triggers on an invented margin.
To test it I wrote three cases by hand, with costs and outcomes that serve only to make the arithmetic run: they are test data, not measurements of any model. Case A has a jump model that succeeds once more while spending double; case B one that succeeds four more times on the tasks the base missed; the third is case B with a success that is worth little.
python3 -I prova_aritmetica.py
# Output:
# Caso A (1 riuscita in piu', spesa doppia), una riuscita vale 1.00 USD
# base prove=10 riuscite= 8 spesa= 2.0 USD/riuscita=0.25
# salto prove=10 riuscite= 9 spesa= 4.0 USD/riuscita=0.4444
# coda: 2 compiti falliti dal modello base; prove riuscite dal salto su quei compiti: 1
# verdetto: resta - differenza di 1 riuscite: sotto la soglia di 2, e' rumore
# Caso B (4 riuscite in piu', spesa doppia), una riuscita vale 1.00 USD
# base prove=10 riuscite= 6 spesa= 2.0 USD/riuscita=0.3333
# salto prove=10 riuscite=10 spesa= 4.0 USD/riuscita=0.4
# coda: 4 compiti falliti dal modello base; prove riuscite dal salto su quei compiti: 4
# verdetto: sale - 4 riuscite in piu' valgono 4.0 USD, la spesa in piu' e' 2.0 USD
# Caso B con una riuscita che vale 0.30 USD
# base prove=10 riuscite= 6 spesa= 2.0 USD/riuscita=0.3333
# salto prove=10 riuscite=10 spesa= 4.0 USD/riuscita=0.4
# coda: 4 compiti falliti dal modello base; prove riuscite dal salto su quei compiti: 4
# verdetto: resta - 4 riuscite in piu' valgono 1.2 USD, la spesa in piu' e' 2.0 USD
Case A stays on the starting model because the difference of one success is below the threshold: the code does not try to justify the spend. Case B goes up, because four successes are worth four dollars against two of extra spend. The third case is the same data set as the second with a success that for you is worth thirty cents, and the decision flips: the data are identical, what changes is what you do with them. That is the point of the article, and also the reason why no published comparison can decide in your place.
The scheme for a real run is below. I did not run it, because it requires a key and a budget: you compute the order of magnitude of the spend beforehand with the pricing page, multiplying the runs by the cap per run. The same effort level on the two models is not "the same intensity": the documentation asks you to redo the sweep on each model instead of carrying over the setting of another (and for Sonnet 5.5 it warns that the levels are calibrated differently from those of the previous generation), so fix the level you will use in production for each and, if you can, add a third series at the lower level of the same model.
# schema da adattare: un compito per riga, due modelli, lo stesso livello di effort
python3 - <<'PY'
from runner import prova
from confronto import verdetto, stampa
compiti = [
{"nome": "bug-iva", "cartella": "compiti/bug-iva",
"prompt": "Correggi il bug in prezzo.py in modo che i test passino. Non toccare i test.",
"verifica": ["python3", "-m", "unittest", "-q"]},
# ...altri quattro-nove compiti presi dal tuo lavoro vero, ciascuno con una verifica automatica
]
base = [prova(c, "claude-opus-5-5", "xhigh") for c in compiti]
salto = [prova(c, "claude-fable-5-2", "xhigh") for c in compiti]
stampa("opus contro fable", verdetto(base, salto, valore_riuscita_usd=1.00))
PY
The scheme has only one task written out in full and a comment: the real work is choosing five to ten from your repository, and it is worth including two or three that the starting model has already missed, because they are the ones that separate the two models. A task for which your verification command does not exist does not go into the set: if you cannot say when it succeeded, you cannot say how much it cost to succeed.
Before moving up: the model is not just a string
If the comparison says to move up, one thing remains to check: moving an integration, or a conversation already
started, to a different model can break requests that passed before. The compatibility matrix is the subject of
Changing Model Generation Without Surprises. For Fable 5.2 the
what's-new page lists four changes that can break code, reported in the dated block below. The case that surprises
those who work with Claude Code most is another one, and it concerns costs: depending on the plan and the seat, the
use of Fable can be charged as usage credits and not against the limits included in the plan. If you do the test
with a subscription, check how it is counted before launching ten tasks: the configuration page warns that in
-p mode Claude Code does not ask for consent and charges Fable to credits when that is the case, and
the runner of this article launches exactly claude -p.
Status as of 2026-11-14: names, prices and advice (rechecked on the official pages on 2026-11-14)
Everything that follows is a version fact and holds as long as the page it comes from does not change: reread the sources at the bottom before relying on a number.
- Identifiers:
claude-opus-5-5andclaude-fable-5-2. In Claude Code thefablealias selects Fable 5.2 (claude --model fable, or/model fable), except in sessions behind a gateway of the Claude apps, where it resolves to Fable 5; Fable 5.2 requires Claude Code 2.1.321 or later, and no Fable model is the starting model of a plan or of a provider. - Prices per million tokens, according to the pricing page: Opus 5.5, 4 dollars input and 20 output; Fable 5.2, 8 input and 40 output. Cache reads cost 0.20 dollars for Opus 5.5 and 0.20 for Fable 5.2.
- Fable 5.2 has a context window of one million tokens (starting value and maximum) and 128 thousand output tokens, with adaptive reasoning always on.
- Official advice: for most workloads start from Opus 5.5 at its starting level; move to Fable 5.2 if the tests at
xhighormaxstay below the requirements. - Four changes that can break code, according to the Fable 5.2 what's-new page: a request that fails the prefix check returns a 400 error; reasoning blocks are tied to the model that produced them; the computer use tool
computer_20251124returns an error outside Amazon Bedrock; with the advisor tool a Fable 5.2 executor requires a Fable 5.2 or Mythos 5.2 advisor. - Anthropic measurements, attributed and not reproduced here: on a subset of 463 SWE-bench Pro problems, Fable 5.2 at
highsolved 96.3% at 1.39 dollars per solved task, Opus 5.5 atxhigh96.5% at 0.75 dollars. On 44 DeepResearch Bench II tasks, Fable 5.2 cost 2.9 times Opus 5.5 with a score 1.9 points lower.
Read this list as an example of what you would put in your own dated block, not as a table to memorise. Fable's price per token is double, except for the cache read, which costs the same in the table: in a long session that rereads a lot of context the real gap narrows, and it is an effect that only your measurement shows. Anthropic's two measurements point in different directions: on a code set the two models reach a similar level with a notable difference in cost, on a research set the more expensive model did worse. They are exactly the two reasons why a comparison on your own work cannot be replaced.
What stays true with the next generation
What stays true is the rule of the cost per successful task, the set of tests with an automatic outcome, the tail of the hard tasks and the choice of declaring beforehand how much a success is worth. Names, identifiers, prices and the starting advice will change: when a new generation comes out you rerun the comparison with the new identifiers and update only the dated block.
What I did not verify
I did not call any model: neither Opus 5.5, nor Fable 5.2, nor the comparison between the two, so your verdict is still to be obtained and could contradict the official advice. I did not read the adaptive reasoning page or the advisor page in full. Anthropic's figures I compared again with the official pages on 2026-11-14. I did not measure how many runs are needed to tell two models apart on your workload: ten is the minimum I recommend, not a statistical result.
Frequently asked questions
Is the price per token enough to choose between Opus and Fable?
No: the price per token tells you what an answer costs, not a finished job. A model that succeeds more often or in fewer rounds can cost less per successful task, and one that does not improve the outcome only costs more.
How many runs do I need?
I do not have a measured figure. With fewer than five tasks noise dominates, and with ten a single success of difference is not enough: the code above asks for at least two more successes, a threshold of mine that you can raise.
Can I switch from Fable to Opus halfway through a conversation?
According to the Fable 5.2 what's-new page, the reasoning blocks of Fable 5.2 are read only by Fable 5.2 and Mythos 5.2: moving a conversation already started between models is a case to test first, not a one-line change.
What you can do now
You can set up the comparison between two models as an experiment on your own work: tasks with an automatic verification, a clean copy for every run, the cost read from the JSON and the verdict computed with a rule you wrote beforehand. You can read the result for what it is: a comparison of money with money that depends on how much a success is worth to you. And you know what you do not have yet: the real run, which requires a key and a spending cap of your own.
In this series. Previous article: Letting Claude Code Work Alone. Next article: Mixing Models: Advisor, Orchestrator, opusplan and Fallback.
Sources
- Claude Docs: Choosing the right model - start from Opus 5.5 and move to Fable 5.2 if the tests at
xhighormaxare not enough, accessed 2026-11-14 - Claude Docs: Optimizing for cost and intelligence - cost per successful task, measurements on SWE-bench Pro and DeepResearch Bench II, spend tail on WideSearch, accessed 2026-11-14
- Claude Docs: What's new in Claude Fable 5.2 - identifier, 1M context and 128k output, adaptive reasoning always on, four changes that can break code, prices, accessed 2026-11-14
- Claude Docs: Pricing - prices per million tokens of Opus 5.5 and Fable 5.2, accessed 2026-11-14
- Claude Docs: Effort - recommendation to redo the sweep instead of carrying settings from one model to another, accessed 2026-11-14
- Claude Code Docs: Model configuration -
fablealias, minimum version 2.1.321, usage credits for Fable, accessed 2026-11-14 - Claude Code Docs: CLI reference - options
--model,--effort,--max-budget-usd,--output-format, accessed 2026-11-14
runner.py, confronto.py and the arithmetic test were run with Python 3 on 2026-11-14 (the first with a fake client, the others with data written by me); the comparison against real models was not run (no key). Prices, names and Anthropic's measurements were compared with the official pages on 2026-11-14. The code listings and the program outputs are reproduced exactly as in the Italian original, so identifiers, messages and comments inside them are in Italian.
Commenti
Caricamento commenti...
Sign in to comment