Cloudflare Clef vs Clef-flash: migrate a Jev decision path on Workers AI safely

Quick answer

Cloudflare now hosts the 27B Clef and 9B Clef-flash decision models on Workers AI. Both follow the System One interface used by Jev, but that does not prove equivalent decisions. Shadow a frozen workload, compare probability quality and fallback rates, then route low-risk cases to Clef-flash and keep Clef or human review for ambiguous or consequential decisions.

Who this is for

This guide is for teams using Jev or evaluating a typed layer for classification, scoring, ranking, extraction, or workflow routing. It focuses on moving that path to Workers AI and choosing between Clef and Clef-flash.

If you are still deciding whether the workload belongs on a decision model at all, start with the Jev versus structured-output workload guide. If you need an evaluation design before rollout, use the Jev latency, cost, and calibration gate.

What changed and why it matters

Cloudflare announced Clef and Clef-flash on Workers AI on October 1, 2026. The model pages describe Clef as a 27B multimodal model and Clef-flash as a 9B multimodal model. Both support noul, choice, and score questions, one to 64 questions per request, and text plus bounded image input. Cloudflare lists input pricing at $0.24 per million tokens for Clef and $0.09 for Clef-flash.

Cloudflare also released Apache 2.0 weights and says the hosted API follows the System One contract. This article covers the hosted path, not self-hosting.

Cloudflare's benchmark comparisons are vendor results, not an IndieSeek reproduction. Your gate must use your own decisions, labels, latency regions, and review policy.

Documented contract and migration boundaries

Dimension Clef Clef-flash What to verify yourself
Workers AI model @cf/cloudflare/clef @cf/cloudflare/clef-flash Exact model ID in every receipt
Published size 27B 9B Do not turn size into a quality claim
Input price $0.24/M tokens $0.09/M tokens Retries, review, and accepted-result cost
Context 65,536 tokens 65,536 tokens Your real truncation behavior
Questions 1–64; noul, choice, score Same documented contract Schema validation and probability use
Vision Up to four bounded images Same documented limits File type, decoded size, privacy, failure path

The documentation caps inputs at four PNG, JPEG, or WebP images: 4 MiB and 16 megapixels each, 8 MiB decoded in total, and a 13 MiB request body. Remote URLs are unsupported. Treat these as validation rules, not targets.

A seven-step migration workflow

1. Freeze the current decision contract

Record the endpoint, model, state builder, question types, label order, thresholds, fallbacks, and downstream effects. Version the copy: compatibility is meaningless if label order or threshold semantics drift.

2. Build a representative replay set

Sample normal cases, rare labels, ambiguous inputs, long states, multilingual text, malformed requests, and consequential branches. Remove secrets or obtain authorization before replaying production data. Freeze expected labels and reviewer disagreement.

3. Add request and decision receipts

For every replay, store corpus and contract versions, model ID, tokens, latency, probabilities, action, fallback reason, and reviewer outcome. Do not log raw sensitive state merely for observability.

4. Run both models in shadow mode

Send the same contract to both models without production side effects. Compare parse failures, top choice, probability margin, fallback rate, latency, and reviewer acceptance. Matching labels can still hide different confidence.

5. Route by risk, not model size

Use Clef-flash for reversible actions when the margin clears a calibrated threshold and replay acceptance is stable. Use Clef or human review for novel inputs, narrow margins, expensive mistakes, or external side effects.

6. Measure accepted-decision cost

Raw token price is only one term. Use:

accepted-decision cost =
  (model input cost + retry cost + review cost + correction cost)
  / accepted automated decisions

A cheaper model with more fallbacks may cost more per useful decision. Keep vendor price and measured operational cost separate.

7. Canary one bounded path

Start with one reversible workflow and a small slice. Keep the Jev route live, pin model IDs, and define rollback triggers for schema failures, latency, fallback rate, disagreement, and harmful side effects. Expand only after enough labeled outcomes.

Full-versus-flash decision tree

Is the action consequential or hard to reverse?
  yes -> Clef or human review
  no  -> Is the input in the validated replay distribution?
          no  -> Clef, then review if margin is low
          yes -> Does Clef-flash clear the calibrated margin?
                  yes -> Clef-flash
                  no  -> Clef -> human review if still uncertain

This is a routing hypothesis, not a universal ranking. Calibrate thresholds per task and version them with the corpus.

Decision receipt template

contract_version: decision-v3
corpus_item: replay-0184
model: "@cf/cloudflare/clef-flash"
question_type: choice
input_tokens: 1842
top_choice: manual_review
top_probability: 0.61
runner_up_probability: 0.34
route_threshold: 0.72
fallback: "@cf/cloudflare/clef"
side_effect_executed: false
review_outcome: accepted_fallback

Common mistakes

Make your Mac notch useful with SuperNotch—more than 20 native tools for music, clipboard, focus, screenshots, system controls, and more.

FAQ

Can I replace a Jev endpoint by changing only the model ID?

Cloudflare says the hosted models follow System One, so transport changes may be small. Contract validation, shadow replay, calibration, and side-effect gates are still required.

Is Clef-flash always the best default?

No. Its published input price is lower, but routing also depends on quality, latency, fallbacks, review cost, and consequence. Measure your own accepted-decision cost.

Are Clef and Clef-flash generally available?

The model pages list hosted endpoints and pricing. Verify your account, region, plan, and invocation path with a non-consequential canary.

Do the models support images?

Yes, within the documented limits. Remote URLs are unsupported, so validate and encode images before calling the model.

Sources