In the two hours to 19:24 UTC on 15 October, one agent ran up eighty-five percent or so of the spend on our shared AI gateway. It was the blog writer that drafts posts for this site, and it was still on Claude Opus 5. We moved it to a cheaper model, Claude Sonnet 5.5, that afternoon, because a test the same day had shown which models actually finished the work, and what each finished task cost.
A company running AI agents should ask the same of Gemini 4 Argon, which Google released on 13 October. What does a finished piece of work cost on it, whether that's a ticket closed, a draft published or a contract clause checked? A token price hides the expensive case: a cheap model that fails the checks and hands the work back to a person. Price it per finished task on your own past work, and you can decide for each kind of task whether to move, before the December price lands.
Our test took five real past tasks from the notes agent on our Databricks Field Guide and replayed them on three models, through every check its production job runs. The cheapest model finished none of them. Argon gets the same test before any agent of ours runs on it. We haven't run that one yet. The timing matters because of the price: $2 per million input tokens and $10 per million output tokens through November 30, 2026 become $4 and $20 on December 1.
Our model replay and its results
Our agents write and fact-check the posts on this site and the notes on our Databricks Field Guide, and they all bill through one Cloudflare AI Gateway account. We ran the bake-off on 15 October and wrote it up in the pull request that settled which model the Field Guide notes agent uses. Each model got the same five real inputs: two briefs our CEO, Preetham Reddy, had answered, two reader questions and one release note. Each replayed the production agent's recorded prompt, taken from the gateway logs, and went through the job's own code with its repair loop, fact-check and helpful-content gate. A draft counted as publishable only if it came out the far end.
| Model | Publishable | Run cost, Sonnet 5.5 = 100% | Per publishable draft |
|---|---|---|---|
| Claude Sonnet 5.5, thinking low | 3 of 5 | 100% | 33% of run cost |
| Claude Haiku 4.5 | 0 of 5 | 16% | none finished |
| Llama 4 Scout 17B (Workers AI) | 0 of 5 | 3% | none finished |
Llama's whole run cost 3% of Sonnet's and produced no publishable draft. Haiku never drew a diagram our renderer accepted in three drafts, even after three repair asks, and one draft invented a first-hand claim. A per-token comparison doesn't show that, and an hour of a person's time spent redoing a failed draft costs more than the tokens the cheap model saved.
Quality got its own reading. Cloudflare's Clef model judged the drafts blind, anonymised and shuffled, three readings each, every pair asked in both orders. Sonnet 5.5 won 62% of pairwise comparisons, and the Opus 5 notes we'd already published won 39%.
The blog writer never got a replay of its own. Since the 12th, its most expensive day had cost more than six times its cheapest. It was draining the credit towards the floor that pauses every agent we run, and we moved it on the notes agent's result. That was a judgement call, and its own past drafts are still the first replay we'd run on Argon.
Cost per finished task: the formula
An agent bills in tokens, but what you're paying for is a ticket closed, a contract clause checked or a pull request that passes review. So we compare models on what each finished task costs:
cost per finished task =
sum over every call in every attempt of
(uncached input × input price + cached input × cached price + output × output price)
÷ number of tasks that passed your checks
Retries, repair rounds, tool calls and the fact-check all count. On Argon the output side includes thinking tokens, which Google's pricing page bills at the output rate.
Argon's published prices for the standard paid tier, per million tokens:
| Through Nov 30, 2026 | From Dec 1, 2026 | |
|---|---|---|
| Input | $2.00 | $4.00 |
| Output, including thinking | $10.00 | $20.00 |
| Cached input | $0.10 | $0.20 |
| Batch input / output | $1.00 / $5.00 | $2.00 / $10.00 |
Cached input is 95% off in both periods. Argon isn't on the free tier, and the page lists no higher rate for long prompts.
Argon's prices on a 20-call agent task
Take an illustrative agent task of 20 model calls. Each call sends 30,000 input tokens, of which 24,000 are a stable prefix (system prompt, tool definitions, the policy document) and 6,000 are new. Each call returns 2,000 tokens, thinking included. Your replay gives you the real sizes.
At the December price with no cache hits, every call costs 30,000 × $4 plus 2,000 × $20 per million, so $0.16, and the task costs $3.20.
With the prefix cached from the second call on, each later call costs $0.024 for fresh input, $0.0048 for the cached prefix and $0.04 for output, so $0.0688. The task comes to $1.47. That's cheaper than the same task at the introductory price with no caching, which is $1.60.
Now divide by the finish rate. If Argon finishes 60% of your replayed cases, the cached task costs $2.45 per finished task at the December price, and at 80% it's $1.83. That counts one attempt per case, so it's a floor, and it leaves out the hour a person spends on every case the agent dropped.
At the December price, caching saves this task $1.73, more than twice what the December increase adds to the cached task. So cache hits matter more to your bill than the November 30 date does. Once the prefix is cached, output is 58% of each call's cost, so the thinking level you pick (Argon takes low, medium or high, per its model page) becomes the biggest dial you have.
Argon's caching is implicit only. Explicit caching isn't supported, so you can't pin a cache yourself. The caching docs set a 4,096-token minimum for Argon and report hits in usage.total_cached_tokens. They advise putting large common content at the start of the prompt and sending similar requests close together. So keep the stable material first and byte-identical between calls. A timestamp at the top of the system prompt is enough to miss the cache on every call.
The replay harness
Take an agent that already runs, keep its prompts and tools, and send a fixed set of real past cases through the current model and the candidate. We'd use 20 to 50 cases with known outcomes, and fewer when the finish rates come out far apart. Our five cases were enough to rule out two models that finished none.
This sketch is the shape of ours, cut down to Python. complete() is whatever client your agent already uses, and passes() is your production checks, unchanged.
import json, random
PRICES = { # USD per 1M tokens: (input, cached input, output)
"gemini-4-argon@intro": (2.00, 0.10, 10.00),
"gemini-4-argon@dec": (4.00, 0.20, 20.00),
"current": (0.00, 0.00, 0.00), # fill in your current model's list price
}
def cost(usage, price):
p_in, p_cache, p_out = price
fresh = usage["input"] - usage["cached"]
return (fresh * p_in + usage["cached"] * p_cache + usage["output"] * p_out) / 1e6
def replay(cases, model, price_key, complete, passes, max_attempts=3):
spent, finished, outputs = 0.0, 0, {}
for case in cases: # recorded prompts from your gateway or trace logs
for _ in range(max_attempts):
text, usages = complete(model, case["messages"]) # every call in the attempt
spent += sum(cost(u, PRICES[price_key]) for u in usages)
if passes(case, text): # the same gates production runs
finished += 1
outputs[case["id"]] = text
break
return {"spent": spent, "finished": finished,
"per_finished": spent / finished if finished else None,
"outputs": outputs}
def blind_pairs(a, b):
"""Shuffle labels so the judge never knows which model wrote which."""
for cid in a.keys() & b.keys():
pair = [("x", a[cid]), ("y", b[cid])]
random.shuffle(pair)
yield cid, pair # ask the judge in this order, then reversed
The zeros under "current" are yours to fill in. Run the Argon replay once and price the same token counts twice, at @intro and at @dec, since the tokens don't change on December 1 and only the multiplier does. Google's model page lists Batch API support for Argon, and a replay doesn't need answers in seconds, so batch halves the cost of running the experiment itself.
A gate tells you a draft is acceptable, and the judge tells you which of two acceptable answers is better. Use a model from a different family to the ones under test, hide the labels, ask each pair in both orders so any lean towards the first answer cancels out, and average several readings. We use Clef on Workers AI for ours.
Deciding per task
A model that wins on contract review can lose on ticket triage, so we'd make the decision for each task type separately, and the replay tells you which way each one goes.
The week we'd plan for one task type goes like this. Monday and Tuesday go on pulling the past cases and their outcomes out of your logs and wiring passes() to the checks production already runs. Wednesday is the replay on both models, through the Batch API where you can. Thursday the judge reads the pairs that both models passed. On Friday you reprice everything at the December rate.
| What the replay shows | What we'd do |
|---|---|
| Argon finishes more cases and costs less per finished task at the December price | Route that task to Argon |
| Argon finishes more cases but costs more per finished task | Route it only where a failed task costs a person more than the difference |
| Same finish rate, judge prefers Argon, cost within a few cents | Route it, and re-run the replay monthly |
| Same finish rate, judge sees no difference | Keep the current model; moving has a cost too |
| Argon finishes fewer cases | Keep the current model, whatever the token price says |
| It only wins at the introductory price | Treat it as a loss. December is the price you'll pay |
That's the same routing we described for agents, and the same reasoning as paying frontier prices only where a task needs them and choosing a GPT-6 model and its effort per task. Our blind judge is one of Cloudflare's Clef models, and the replay is part of how we build AI systems that stay affordable after the pilot. A small model takes the volume, a frontier model takes the few tasks where the replay showed a real gain, and the approval step and permission boundary stay outside the model, whichever one wins.
Context window, long jobs and Argon on Databricks
Argon's context window is 1,048,576 tokens, shared between input and output. A normal synchronous call returns up to 65,536 tokens. Past that you need long decode, which runs as a background interaction (background: true, with store: true required) and generates in 64K hops for up to 24 hours. The docs say every token in every hop is billed, and that the input repeated in later hops gets the 95% cache discount. A job that ends incomplete has used all of max_output_tokens, and the documented fix is to send it again with a higher limit, which means paying for the first attempt as well. We'd size max_output_tokens from the replay before any long job goes near production.
The window doesn't replace retrieval for chatbots and search over company documents. Retrieval still decides what the model reads, and a million tokens of the wrong pages costs $4 a call from December. Our page on chatbots and enterprise search covers that layer. The window is worth paying for when a task needs a whole contract or a whole module in view at once.
If your data lives on Databricks, Argon is reachable there. The Unity Gateway release notes added it on 13 October, and the supported models page lists databricks-gemini-4-argon as a Databricks-hosted, pay-per-token Foundation Model API endpoint. Two lines on that page matter for a design. It uses a global endpoint and requires cross-geography routing to be enabled, which your data-residency review needs to see, and reasoning can't be disabled, so every call carries thinking tokens. That page gives no per-token price. For a client whose data can't leave the workspace, we'd run the Argon replay there, through a Databricks serving endpoint with AI Gateway's usage tracking and rate limits on.
Frequently asked questions
Should a replay use the prompts written for the current model?
Yes, for the first pass, because those are the prompts the candidate would get on the day it goes live. A second pass with prompts tuned for the candidate is fair, but the engineer's time spent tuning goes into the cost of moving. A model that only wins after a week of prompt work has to win by more than that week cost.
Can a cheaper model run the fact-check while a stronger one writes?
For the notes agent we said no. Its draft is a single model call and its research is code, so the only thing left to split was the fact-check. A cheaper fact-checker is the one place a weaker model fails open: a wrong figure it misses goes out in the post. An Argon replay would keep the fact-check on the model that already passes it and test Argon as the writer.
How often should the replay run again?
Whenever a model ships that could take one of our task types, whenever the production checks change, and otherwise monthly, which is the rule our bake-off pull request set. A price change counts as well: December 1 changes Argon's cost per finished task without changing a single token, so the same replay is repriced, not rerun.