Cloudflare's Clef decision models: where they beat an LLM call, and where they don't
Cloudflare's open-weight Clef and Clef-flash return probabilities, not text, for routing and triage. Built for agent builders on Workers AI.
Picture a two-person platform team at a mid-size SaaS company that owns support intake. Every ticket goes to a general-purpose LLM with a prompt that says "return JSON with urgent, team and severity." Most days it works. Then the model wraps the JSON in prose, invents a fourth team, or answers "high" where the code expects "Major," and the parser throws. Each call waits on generated tokens, and the bill grows with every ticket. When an outage ticket lands in the sales queue, nobody can say how confident the model was. None of this needs reasoning or writing. It is three bounded choices.
That is the slot Cloudflare is aiming at with Clef and Clef-flash, two decision models released October 1, 2026 on Workers AI, with weights on Hugging Face under Apache 2.0. They don't write answers. They return a probability for each allowed answer. The launch came in a crowded week: DataNorth counts four decision models inside eight days, including Liquid AI's d1 and Amazon's Strands Decider 2B. All of them are aimed at TypeSafe's Jev.
What it is
Two models, both post-trained by Cloudflare on frozen Qwen backbones. Clef is 27B on Qwen3.8-27B. Clef-flash is 9B on Qwen3.5-9B. Per the launch post, inference is a prefill-only pass that then scores the valid schema choices in parallel. The decision step is non-autoregressive, so no text is generated token by token. Mapped to the lede:
- No parse failures, no invented teams. You define the answer space. The changelog lists three question types:
noul(yes/no, returns probability of yes),choice(returns the chosen option, a probability per option and a confidence value) andscore(an ordered rubric with a probability per level). You can ask up to 64 questions per request. - A confidence number you can act on. The probabilities let your code route, escalate or defer to a human, which is the use Cloudflare describes.
- Bigger, messier inputs. The model docs say state can be text, JSON, images or video. You can send up to four embedded PNG, JPEG or WebP images, 4 MiB each. Remote URLs are not accepted. Cloudflare cites a 64k context window against Jev's 32k, and notes that Jev is text-only.
- Drop-in for Jev users. Clef follows the System One API. Per the changelog, you switch an existing Jev integration by changing the endpoint and model.
- Speed (vendor-reported, 43 benchmark runs): Clef median 209.3 ms and p95 238.6 ms. Clef-flash median 38.8 ms and p95 122.4 ms. Jev median 524.1 ms and p95 536.0 ms.
- Accuracy (vendor-reported): Cloudflare says a Clef model scores highest on 7 of 10 decision benchmarks. One example is BANKING77 at 94.20 macro-F1 against Jev's 79.74. It doesn't win everywhere. In Cloudflare's own table, Jev leads When2Call at 80.97 to Clef's 72.37, and Clef-flash drops to 66.77 on CLINC150+OOS where Jev scores 89.27.
- A fine-tuning service. An RL service starts as hands-on work with Cloudflare's forward-deployed engineers. A self-serve platform is promised later. The Decoder describes the planned pipeline: log requests through AI Gateway, evaluate them in containers as an RL sandbox, then deploy through a trainer component to Workers AI.
Alternatives, each described only from what our sources say:
- Jev (TypeSafe): the incumbent. It is text-only and, per DataNorth, a hosted API only. Byteiota lists it at $0.042 per million input tokens. Trade-off: no image input and no weights to run yourself.
- Strands Decider 2B (AWS): per TechCrunch, it is open source, built on Qwen3.5-2B and small enough to run locally. Trade-off: local-friendly, but our sources have no head-to-head accuracy data for it.
- OpenAI Decisions API: The Decoder reports it is built on GPT-6 Luna and accepts text or images. Trade-off: our sources have no detail on it beyond that.
- Laya (open source): the arXiv pentest-harness paper surveys it as a System One model. Cloudflare's own latency table shows it as very fast but weaker on quality.
- A general LLM call: open-ended enough to reason and generate text, but non-deterministic. In Cloudflare's domain-classification test, gpt-oss-120b took 4.7s and returned two categories. Clef took 2.2s for the same fetch, render and classify.
Who it's for
Pick it up if you already run on Workers and your agent makes far more routing, gating and triage calls than generation calls. It also fits if you classify images such as screenshots, uploaded documents or user submissions, or if you are on Jev and want open weights or a longer context window. DataNorth's read is to try Clef-flash first.
Skip it if your "decisions" actually require the model to know things. DataNorth reports that Jev still beats Clef on GPQA Diamond and MMLU-Pro, the knowledge-heavy sets. Skip it if the output you need is text, or if you are not on Cloudflare and don't want to host a 27B classifier. DataNorth suggests a fine-tuned small encoder may match it on one narrow task. And skip it, for now, if you don't have labeled examples to check it against.
Before and after
Before:
- A ticket arrives, and you build a prompt asking a general LLM for JSON.
- You wait for generated tokens.
- You parse the output, handle malformed JSON, and map free-text values onto your enum.
- You route the ticket, with no usable confidence signal.
After:
- A ticket arrives, and you send it as
statewith typednoul,choiceandscorequestions. - You get a probability for every allowed option. The output can't fall outside the schema.
- Your code sets thresholds: act when confident, escalate or defer to a human otherwise.
- The LLM is reserved for steps that need reasoning or text, such as drafting the reply. Byteiota describes this three-layer split: LLMs for planning, decision models for routing and gating, deterministic code for known answers.
Try it
The hosted models are @cf/cloudflare/clef and @cf/cloudflare/clef-flash. You can call them through the Workers AI binding (env.AI.run()) or the REST API at /ai/run, optionally via AI Gateway. This request is from the launch post:
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/cloudflare/clef \
-X POST \
-H "Authorization: Bearer $CLOUDFLARE_AUTH_TOKEN" \
-d '{
"model": "clef",
"state": "Checkout has been failing for every customer for the last hour.",
"questions": {
"urgent": { "type": "noul", "instructions": "Is this support request urgent?" },
"team": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"billing": "Payments, invoices, and refunds",
"technical": "Outages, errors, and configuration",
"sales": "Plans and upgrades"
}
},
"severity": {
"type": "score",
"instructions": "How severe is the customer impact?",
"criteria": ["No impact", "Minor", "Major", "Critical"]
}
}
}'
Cost and access. Workers AI pricing is $0.011 per 1,000 Neurons, with 10,000 Neurons a day free on both Free and Paid plans. Usage beyond that requires Workers Paid. The pricing excerpt we have does not list a Clef rate. Byteiota says a Workers Paid plan is required to use Clef at all, which sits awkwardly with the free allocation on the pricing page, so check before you plan around it. The weights are on Hugging Face, but our sources give no hardware requirements for self-hosting. For fine-tuning, the changelog offers a design-partner signup.
A sensible first step is to take a few hundred past decisions with known correct answers, run them through Clef-flash and Clef, and compare against your current LLM call. That is our suggestion, not Cloudflare's.
Where it breaks
- The benchmarks are Cloudflare's. The Jev Decision Index lead, the 7 of 10 claim and the 3 of 4 wins on TypeSafe's workflow evals are all vendor-run, and we found no independent replication. DataNorth notes Cloudflare doesn't say where its Jev figures came from.
- Production latency may not match the sheet. Byteiota reports independent developers measuring Clef-flash medians near 661 ms during the Workers AI beta. One called a 3-second response "useless." The same piece cites a 42-decision test with Jev at 71.4% accuracy, Clef-flash at 66.7%, and 83% agreement between the two.
- Typed output is not correct output. In its analysis of Jev, Amplitude quotes Anthony Maio: the type system constrains the shape of the output, not the judgment. A 77-case BANKING77 pilot on Jev found 87.4% mean confidence against 75.3% actual accuracy. A cascade study matched frontier accuracy at roughly a quarter of the cost, but agreed with the frontier model 6 to 8 points more often than with ground truth. Amplitude also notes that calibrated nodes don't compose into a calibrated workflow. These findings are about the category, not Clef specifically.
- Treat "no human in the loop" as Cloudflare's framing. The Decoder points out that the "without hallucinations" pitch for Jev only guarantees answers stay inside the options, not that they're right.
- Portability has limits. Image input is a Clef extension to the System One API, so image calls won't port back to Jev. Long text state is truncated to fit the token limit. It is also unconfirmed whether request and response schemas are byte-identical across Clef, Perplexity and Strands.
- "Open source" means open weights. Byteiota notes the training data and pipeline aren't public.
- Costs and lock-in are unclear. Clef's per-token price isn't confirmed in Cloudflare's docs. The $0.24 and $0.09 figures in circulation come from secondary coverage. The RL service has no published price or minimum data requirement and is gated behind a forward-deployed-engineer engagement. Its planned self-serve path runs entirely on Cloudflare.
- Other gaps. There are no verified latency or hardware figures for Kev. Local hardware needs for pplx-decider-v1-27b are unconfirmed.
Sources
- Introducing Clef: our open-source decision models, and new RL fine-tuning platform · Cloudflare Blog
- Cloudflare Clef: open-weight decision models on Workers AI · DataNorth AI
- Amazon releases its own Jev clone as decision models flood the web | TechCrunch · TechCrunch
- Cloudflare says its new Clef model means humans no longer need to be in the loop for AI agents · THE-DECODER.com
- An analysis of Jev: Faster and cheaper, but watch the accuracy · Amplitude
- Calibrated Decision Models for Autonomous Penetration-Testing Harnesses: JEV and Laya as System One Decision Layers for LLM-Driven Pentest Agents · arxiv.org
- Cloudflare Clef: Open-Source Decision Models for Agents | byteiota · Byteiota
- Introducing Clef: Cloudflare's first open-source decision models, now on Workers AI · Changelog · Cloudflare
- clef (Cloudflare) · Cloudflare AI docs · Cloudflare Workers AI docs · Cloudflare
- Pricing · Cloudflare Workers AI docs · Cloudflare