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:

Alternatives, each described only from what our sources say:

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:

  1. A ticket arrives, and you build a prompt asking a general LLM for JSON.
  2. You wait for generated tokens.
  3. You parse the output, handle malformed JSON, and map free-text values onto your enum.
  4. You route the ticket, with no usable confidence signal.

After:

  1. A ticket arrives, and you send it as state with typed noul, choice and score questions.
  2. You get a probability for every allowed option. The output can't fall outside the schema.
  3. Your code sets thresholds: act when confident, escalate or defer to a human otherwise.
  4. 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

Sources