Cloudflare released Clef and Clef-flash on October 1, 2026: open-source decision models designed to return bounded, typed choices rather than generate open-ended prose. Both are hosted on Workers AI and released under Apache 2.0.
Why decision models matter
Many agent steps are decisions: which tool should run, whether a request is urgent, which queue should receive it, or whether a workflow should escalate. A general LLM can perform these tasks, but open-ended generation may add latency and validation work. Clef focuses on finite choices and structured probabilities. Cloudflare says Clef includes vision input and a 64k context window, while Clef-flash targets latency-sensitive decisions.
Write the decision schema before selecting a model
Imagine a support inbox that must send each message to billing, account access, technical support, or manual review. The output is a bounded decision, not a free-form essay. Write the allowed choices and their operational meaning first. Billing should not become a catch-all for any message mentioning money; manual review should have a clear role when evidence is insufficient or several issues overlap. A precise schema makes it possible to inspect errors consistently and keeps downstream actions from interpreting arbitrary prose.
Cloudflare documents Clef as returning probabilities for allowed options in typed questions. That output shape is useful for routing, but a reported probability is not an authorization to perform a sensitive action. In our inbox example, classification can suggest a queue while a separate policy decides what data the chosen queue may access. Keep a generative model for cases requiring explanation, drafting, or open-ended investigation. Asking a decision model to compose a long reply and asking a general model to invent your queue names both mix responsibilities unnecessarily.

Evaluate mistakes in the terms your workflow cares about
Overall accuracy can conceal the most expensive failure. Sending an ordinary how-to question to manual review may delay a response; sending an account takeover report to the wrong queue can matter much more. Build a small labeled set that represents these differences and review examples where two reasonable people disagree. Label ambiguity belongs in the dataset record rather than being hidden as a model defect. Include messages with missing context, sarcasm, and multiple requests, because operational inboxes are rarely clean single-purpose sentences.
A probability threshold should come from observed validation behavior on that task. It should not be chosen because a round number sounds safe. Compare the system with a simple baseline, such as explicit rules for a few unmistakable cases plus manual review elsewhere. Evaluate abstention rate and the cost of incorrect confident choices alongside correct classifications. We have not run an AiFolder Clef routing benchmark; vendor performance claims and the illustrative workflow are separate from the results your own validation would produce.

Vendor benchmarks, clearly labelled
Cloudflare reports median latency of 209.3 ms for Clef and 38.8 ms for Clef-flash across its 43-evaluation set, compared with 524.1 ms for Jev in the same table. Cloudflare also reports a domain-classification workflow taking 2.2 seconds with Clef plus Browser Run versus 4.7 seconds with gpt-oss-120b. These are Cloudflare-reported results, not independent AiFolder measurements.
Where it fits
A useful architecture is: input → bounded decision → policy check → specialist tool or LLM → action. The decision model routes; deterministic code still enforces authorization. A confidence score should never become permission for a high-impact action by itself. Related AiFolder content: AI Agent Permissions Explained, AI Coding Benchmark, and the AiFolder AI Hub.
Planned AiFolder benchmark
AiFolder plans to compare a decision model and a general LLM on tool routing, support classification, safe/unsafe command classification and multi-label routing. We will record accuracy, calibration, p50/p95 latency, invalid-output rate and estimated inference cost. We will shuffle option order to test positional sensitivity. Benchmark status: pending.
Keep the decision path reversible
Start by using the classifier to propose a route and letting existing operators confirm it. Keep the original message, model version, allowed choices, selected option, and correction. This creates a useful feedback set without pretending that every user correction is automatically a training example. When a queue definition changes, rerun the evaluation against the new schema. The model's old label can become invalid even if its language understanding has not changed.
Roll out by task category rather than giving the model every operational choice at once. Automatic routing of low-impact messages is easier to reverse than an automatic refund or permission grant. Keep a fallback when inference times out or returns malformed data, and make the fallback visible in the task record. A decision layer earns its place when it reduces a specific workflow burden with measurable error control. It does not remove the need for explicit business rules, responsible operators, or a path for a user to challenge the outcome. Retain a plain-language route explanation for the operator who must correct an unusual case later.

Sources
Cloudflare Blog — “Introducing Clef: our open-source decision models, and new RL fine-tuning platform,” October 1, 2026.
Practical takeaway
Clef matters because it sharpens an emerging architecture: LLMs reason and generate; decision models route and classify; code enforces policy. If independent tests confirm the latency-quality trade-off, that separation could become common in production agents.


