Cloudflare Clef: Open-Weight Decision Models for AI Agents
Most model releases are about generating better text. Cloudflare's
latest release does the opposite: two new open-weight models that never write
a single word.
Announced on October 1 during the company's Birthday Week, Clef and Clef-flash are decision models — systems built for the constant, unglamorous work inside AI agents: classifying, routing, and choosing. Instead of generating prose, they answer a fixed set of typed questions with probabilities. And unlike the closed models that pioneered this category, both ship with open weights under the Apache 2.0 license, free to download and self-host.
Source: Cloudflare blog
What happened
Clef is the larger of the pair: 27 billion parameters built on Qwen3.8-27B. Clef-flash is the 9-billion-parameter version built on Qwen3.5-9B. These are reportedly the first models trained entirely in-house by Cloudflare's Workers AI team, and a detailed breakdown of the release covers the full announcement.
A decision model works differently from a chat model. You send it a state description — say, an incoming support ticket — plus a schema of typed questions: yes-or-no, multiple choice, or scored rubrics. Up to 64 questions fit in a single request. The model reads everything in one forward pass and returns a probability for every allowed option. Nothing is generated token by token, so there is no paragraph to parse and no malformed JSON to handle. Both models accept text, JSON, images, and video, with a 64,000-token context window and a vision encoder that handles up to four images per request — see this spec rundown of both models.
Cloudflare describes Clef as fully API-compatible with Jev, the closed decision model TypeSafe launched on September 15 — switching between them is mostly a matter of changing the endpoint and model name. Alongside the models, Cloudflare announced a reinforcement-learning service for fine-tuning Clef on private data, starting as a hands-on engagement with its engineers and moving to self-serve later.
The company's own benchmarks are striking, and should be read as the company's own: a median latency of 38.8 milliseconds for Clef-flash and 209.3 ms for Clef, and a macro-F1 of 94.20 on the BANKING77 classification benchmark against 79.74 for Jev. Cloudflare also reports 97.4% versus 89.3% on CLINC150 intent classification — while conceding Jev wins on harder reasoning, 78.3% to 48.0% on GPQA Diamond.
Hosted pricing is $0.24 per million input tokens for Clef and $0.09 for Clef-flash on both Workers AI and OpenRouter, with output tokens not billed at all. For comparison, Jev is listed at $0.042 per million input tokens. The name, by the way, is a music-theory reference: a clef fixes the pitch names on a staff, and Cloudflare says its model similarly fixes the domain of decisions before the actions that follow.
Why it matters
A production agent makes far more small judgments than it writes paragraphs. Is this ticket urgent? Which team owns it? Is this crawler a good bot or a bad one? Today, most teams answer those questions by paying a chat model to generate a paragraph and then parsing out the one word they wanted — expensive, slow, and brittle.
Decision models are rapidly becoming a category of their own. TypeSafe's Jev defined it in September as a closed product; Convai's Laya and AWS's Strands Decider 2B answered as small open models; Clef is now the first large-scale open-weight entry, from a company whose edge network already sits in front of a huge share of web traffic. This explainer on the decision-model wave maps the key players, and this analysis of the release argues the category is bigger than it looks.
But vendor charts deserve independent verification, and one arrived quickly. An independent developer test published this week ran Clef, Clef-flash, and Jev through the same intent-routing and passage-picking tasks via OpenRouter. Clef tied Jev on accuracy for these simple tasks — nearly every answer correct — but it was 1.7 to 3.4 times slower end to end, cost 3.4 to 6 times more per call, hit occasional capacity errors, and showed a real weakness: its confidence scores barely moved between right and wrong answers (0.81 versus 0.74), while Jev's dropped clearly (0.99 versus 0.71). Clef-flash was closer to Jev on speed and price but repeatedly confused look-alike names. The tester's verdict: Jev stays in his app, and he will re-run the test in a month.
Cloudflare's Decision Index vs. latency chart (self-reported) — source: Cloudflare blog
The honest read: Cloudflare's latency and accuracy claims were measured on its own infrastructure, and production reality through a third-party router looks different today. But the durable advantage was never the chart — it is the open weights. You can download Clef, run it on your own hardware, fine-tune it on your own data, and audit what it does. For teams already building on Cloudflare, or anyone who wants to own the decision layer of their agents rather than rent it, that is the actual story.
How to try it
- Self-host: the weights are published on Hugging Face under Apache 2.0. The 9B Clef-flash fits on a single consumer GPU; the full 27B model needs roughly 54 GB of memory in bf16.
-
Hosted: both models run on Cloudflare Workers AI as
@cf/cloudflare/clefand@cf/cloudflare/clef-flash, and on OpenRouter ascloudflare/clefandcloudflare/clef-flash. - API: requests go to a decisions endpoint with a state object and a questions schema. An illustrative request looks like this:
{ "model": "cloudflare/clef", "state": {"ticket": "Tracking hasn't updated in five days."}, "questions": { "intent": { "type": "choice", "criteria": { "billing": "charges, invoices, refunds", "shipping": "delivery status and delays" } } } }
- Fine-tuning: the RL fine-tuning service is currently offered as an engineer-led engagement, with a self-serve platform planned.
Closing
Clef will not replace your chat model. It is after the jobs your chat model was never good at: the thousands of tiny decisions an agent makes between the paragraphs it writes. Whether open weights and Cloudflare's distribution are enough to take that layer is still an open question — and it is one you can now test yourself, because the weights are downloadable.


Comments
Post a Comment