Skip to content

How we split our AI decisions across Cloudflare's three Clef models

Preetham ReddyUpdated 8 min readVoices

Our first attempt at a cheaper screen turned away 5 of the 13 stories Clef had passed, OpenAI's GPT-6.1 Sol launch among them. On 9 October we tried Clef-flash, the smallest of Cloudflare's three Clef decision models, on its own against the 70 live stories in the feeds TechFabric's content agent reads. It agreed with Clef on 93% of them, and every disagreement was a story Clef wanted and Clef-flash threw out.

Any business that makes the same call thousands of times a day has the problem we had, whether the call is approving a loan, routing a support ticket or sending a warranty claim back. The call has to be cheap, quick and the same every time. A chat model asked to write JSON is none of those, so the decision model you pick decides what each call costs and how often a person has to step in. For Auto Approve we built the automated approval engine that doubled the loans they process each month and replaced four or more manual workflows. Before we'd recommend a Clef model for a client's approvals or claims, we wanted all three running on our own work.

So we changed Clef-flash's job and kept the model. It became a screen in front of Clef. It turned away 40 of the 70 and sent 30 on, all 13 of Clef's passes among them, and Clef makes every call that goes forward. Clef-omni, which Cloudflare shipped the same day, looks at our blog covers and watches our explainer videos, and a video with its soundtrack is evidence the other two can't read at all.

Where the cheap screen didn't fit

Triage wasn't the only screen we tried Clef-flash on, and it was the only one it kept. On the screen that picks publications for our outreach, Clef-flash rejected all 3 of the publications Clef had qualified. On the safeguard that spots paid placements it tracked Clef poorly. Both stayed on Clef, and so did the SEO agent's screens, which read so little each day that a cheaper model saved nothing worth the risk.

We came out of that week with a rule we'd apply on the AI workflows we build for clients too. The cheap model screens only where we've measured that it keeps everything the strong one passes, Clef decides, and Clef-omni only gets the evidence that turning into text would lose.

The three models on one table

All three take the same request, a state plus up to 64 typed questions answered as yes-no, a choice or a score. Each answer comes back as a probability, so there's nothing to parse and no output tokens to pay for. We took the figures from Cloudflare's model pages for Clef, Clef-flash and Clef-omni, the October changelog and the Clef-omni launch post.

Clef-flash Clef Clef-omni
Size 9B 27B 30B mixture of experts, 3B active
Context 24,576 tokens 65,536 tokens 64,000 tokens
Input price $0.038 per M tokens $0.24 per M tokens $0.15 per M tokens
Reads Text and up to 4 images Text and up to 4 images Text, images, up to 4 audio clips and 2 videos
Median latency 38.8 ms at launch 209.3 ms at launch, since made faster About 130 ms for text, 1.5 s for a 21-second video

On the launch benchmarks, Clef-flash beats Clef by about fifteen points on the home appliances set and loses by about thirty on CLINC150+OOS, which tests whether a model can say "none of these apply". A client's workload usually looks like one of those more than like the average, which is why we'd never pick between them on a leaderboard.

Where each one works for us

Clef-flash narrows lists. We ask it whether a story is about our subjects and never whether a piece of writing is any good, because every quality threshold we have was measured on Clef. At about a sixth of Clef's price it can read everything. A story it turns away is one Clef never has to read, and now that Clef reads under half the stories, each triage pass costs about 40% less.

We'd build it this way for a client. One rule matters more than the thresholds. If Clef-flash doesn't answer, or leaves a question out, the item goes on to Clef, because a screen that rejects on silence quietly loses work.

// A screen in front of the decider: flash only rules out what it is sure of.
const PREFILTER = { model: "clef-flash", min: { practice: 0.1, fit: 0.4 } };

async function judge(state) {
  // No answer from flash means no screening, never a rejection.
  const quick = await ask(state, { model: PREFILTER.model }).catch(() => null);
  const answered = quick && Object.keys(PREFILTER.min).every((k) => typeof quick[k] === "number");
  const out = answered && Object.entries(PREFILTER.min).find(([k, t]) => quick[k] < t);
  if (out) return { verdict: "out", by: "clef-flash", why: out[0] };
  const scores = await ask(state, { model: "clef" });
  return { verdict: decide(scores), by: "clef" };
}

sure it's off subject

anything else, or no answer

The day's stories from our feeds

Clef-flash screen

Turned away

Clef decides

Story goes forward

Explainer videos and blog covers

Clef-omni watches and looks

Clef-flash turns away only the stories it's sure of, Clef makes every call that goes forward, and Clef-omni watches our videos and looks at our covers.

The thresholds on the screen are deliberately loose. We set them by running both models over the same 70 stories and moving them until the screen kept everything Clef passed, and only then counted what it saved.

Clef makes the calls that matter. It reads every paragraph of every new post for writing that's apologetic, generic or hype, and it sits on a panel of three decision models that read each draft against Google's own guidance before it reaches an editor. We set those thresholds against posts a person had already judged, 15 good and 22 bad, and wrote up how that went.

Clef-omni watches. Our video check reads a finished explainer in two passes. The picture alone goes with four questions: whether it stays on subject, whether any on-screen text claims a partner tier, whether another company's logo is on it, and whether it looks off-brand. The clip with its soundtrack goes with the fifth, whether the narration is audible and in step, and a muted copy scored 0.05 on that one. We split it because sound made Clef-omni worse at reading the screen. With the soundtrack playing, a full-width banner claiming a partner tier scored 0.21 on the tier question, and on the silent picture 0.54, where the clean video read between 0.08 and 0.32. A person still watches every video once with the sound on before it goes out, and Clef-omni catches the problem before they spend the time.

How we'd triage warranty claims

A warranty desk in manufacturing has the same shape as our pipeline. Take an appliance maker whose dealers file claims with a serial number, the technician's fault code, a photo of the rating plate, a phone recording of the unit running and sometimes a short video. A clerk checks the plate against the serial on file, listens for the noise the technician described, decides covered or wear and tear, and approves the claim or sends it back. Two clerks can hear the same recording and reach different answers.

We'd run it in two stages, exactly like the story triage. Clef-flash reads the text and the plate photo and answers one question, whether the packet is complete enough to decide. Only the packets it's sure are incomplete go back to the dealer with the reason, and anything it's unsure of goes forward. Complete packets go to Clef-omni with the photo, the recording and the video when there is one:

{
  "model": "clef-omni",
  "state": "Serial on file: <serial>. Fault the technician entered: <fault code and part>. Unit installed <months> months ago.",
  "images": ["data:image/jpeg;base64,<rating-plate>"],
  "audio": ["data:audio/mpeg;base64,<unit-running>"],
  "questions": {
    "plate_matches": { "type": "noul", "instructions": "Is the serial number on the rating plate photo the same as the serial on file?" },
    "fault_heard": { "type": "noul", "instructions": "Does the recording contain the noise the technician's fault describes?" },
    "fault_class": {
      "type": "choice",
      "instructions": "Which best describes the fault?",
      "criteria": {
        "defect": "A part failed under normal use within the warranty period",
        "wear": "Expected wear for the unit's age and use",
        "damage": "Physical damage, misuse or incorrect installation",
        "unclear": "The evidence does not support any of these"
      }
    },
    "severity": { "type": "score", "instructions": "How serious is the fault for the customer?", "criteria": ["Cosmetic", "Degraded", "Unusable", "Unsafe"] }
  }
}

The unclear option is there on purpose. A decision model can only choose among the options you give it, and a schema with no honest way out forces a guess.

The probabilities come back per question, and what to do with them is the manufacturer's policy rather than the model's. We'd auto-approve above one band, send back below another and route the middle to a clerk. The bands would live in configuration, so the warranty team can move them without a deploy. The bands picked in week one would be wrong, so we'd log three numbers from the first claim. We'd want the share approved with no person involved, how often the model and a clerk disagree on a sampled overlap, and how many automatic approvals are reversed within thirty days.

The cost is easy to work out from the rates, since media is billed as input tokens. A rating-plate photo is at most 1,024 tokens. Thirty seconds of audio is about 390. A 20-second 480p video with sound adds roughly 3,100 more. With a long state and the four questions, a claim with a video comes to about 6,500 tokens, which at $0.15 per million is about a tenth of a cent. Fifty thousand claims a month is about $49 of Clef-omni. Video resolution moves it most, and for "is the drum turning" 480p is plenty.

The limits we design around

Clef-omni gives you probabilities and never a transcript. If the business needs the customer's words on file, a speech-to-text model still runs beside it.

Media counts against the context window before your text does. If the attachments fill it, the request fails outright, and if they nearly fill it, the state is cut from the end to fit. Put the fields the decision depends on at the front of the state.

Clef-flash's weak score on out-of-scope detection is the one we'd test first on any client's data. A screen that can't say "none of these" lets through the very cases a screen is meant to stop. Clef and Clef-flash are open-weight under Apache 2.0, and Clef-omni's weights are on Hugging Face too, so a few hundred decisions a clerk has already made can be run through all three before anyone signs a contract.

Frequently asked questions

Which Clef model should I start with?

Start with Clef for any decision that's expensive to get wrong, and add Clef-flash in front of it once you can show, on your own data, which items it can safely turn away. Reach for Clef-omni when the evidence is audio or video. For text and images it's cheaper than Clef, but Clef scores higher on several of the text benchmarks, so we'd test both on your own decisions before choosing.

Can Clef or Clef-flash read video?

No. In the API, Clef and Clef-flash accept text and up to four images. Audio clips and videos are a Clef-omni extension, up to four audio clips and two videos of 60 seconds each per request, sent base64 encoded because remote URLs are not accepted.

How much does Clef-omni cost for audio and video?

Media is turned into input tokens and billed at $0.15 per million. Audio is about 780 tokens a minute, and video up to about 15,400 tokens a minute at full resolution or about 8,600 at 480p, plus about 780 a minute for sound. There's no charge for output tokens.