Introducing Clef: our open-source decision models, and new RL fine-tuning platform
Short summary
Cloudflare open-sourced two decision models called Clef and Clef-flash that classify inputs into typed, structured outputs with probabilities — useful for routing customer support tickets, identifying phishing domains, or triggering automated agent actions. The models outperform Typesafe's Jev system on speed and benchmarks while supporting images and a 64k context window.
- Clef processes decisions 2x faster than general LLMs (2.2s vs 4.7s in Cloudflare's threat intelligence workflow) because it scores schema choices in parallel rather than generating text token-by-token.
- The models beat Jev on most Jev Decision Index benchmarks and Typesafe's own eval suite, with Clef-flash offering exceptional speed-to-quality tradeoffs; median latency is 209ms for Clef and 38.8ms for Clef-flash.
- Both models are open-sourced on Hugging Face under Apache 2.0, hosted on Workers AI at Cloudflare's edge for low network latency, and fully API-compatible with Jev for easy switching.
Full summary
Cloudflare just released Clef, a pair of decision models designed to make fast, deterministic classifications for AI agents. Unlike large language models that generate open-ended text, decision models take in structured inputs and return bounded, typed outputs with confidence scores—useful for routing customer support tickets, classifying domains for threat detection, or any task where you need a program to make a binary or categorical choice without human intervention. Cloudflare tested Clef on their Threat Intelligence team to classify website domains, and it completed the job in 2.2 seconds compared to 4.7 seconds for their fastest LLM, while returning more granular classifications. The models come in two sizes: Clef (more powerful) and Clef-Flash (optimized for speed), both open-sourced on Hugging Face under Apache 2.0 and hosted on Cloudflare's Workers AI platform.
What sets Clef apart from competitors like Typesafe AI's Jev is threefold. First, it has a vision encoder that can classify images, whereas Jev only handles text. Second, Clef's 64k context window doubles Jev's 32k limit, letting you feed more information for the model to evaluate. Third, it's faster—median latency of 209ms for the full model and 38.8ms for Flash, beating most competitors on the Jev Decision Index benchmarks. Across 43 different evaluation tests covering tasks like invoice processing, customer service routing, and security incident classification, Clef either matched or outperformed Jev and other decision models on accuracy while maintaining a latency advantage.
Cloudflare is also launching a reinforcement learning fine-tuning product so customers can adapt Clef to their specific workflows. They're starting with hands-on support from their forward-deployed engineer team, then moving to a self-serve platform where you can train and redeploy the model directly. The API is fully compatible with Jev's, so if you're already using decision models, swapping in Clef requires minimal code changes. The company guarantees they won't read, store, or train on your data unless you explicitly opt into the fine-tuning service.