Cloudflare Workers AI retires 24 models on November 20. After that date, any request to a retired model ID fails. If your Worker, Pages Function or app calls one of these IDs, it breaks on schedule unless you switch first.

This guide lists every retired model, the replacement for each, and a safe way to migrate without downtime.
Workers AI Shutdown Date and 410 Error Code Explained
Cloudflare originally planned the shutdown for November 15 and later moved it to November 20. Once the date passes, calls to a retired model return an HTTP 410 Gone response with error code 5028. Some notices mention a 404 error, but the official changelog documents 410, so write your error handling for 410.
Cloudflare retires 16 language models and 8 models in other categories (text to speech, image generation, speech to text, vision and embeddings). You can check the original announcement in the Workers AI changelog.
Workers AI Models Being Retired: Image, Speech, Vision and Embedding Replacements
These eight models have a direct replacement.
| Retired model | Replacement |
|---|---|
| @cf/myshell-ai/melotts | @cf/deepgram/aura-2-en |
| @cf/stabilityai/stable-diffusion-xl-base-1.0 | @cf/black-forest-labs/flux-2-klein-9b |
| @cf/runwayml/stable-diffusion-v1-5-inpainting | @cf/black-forest-labs/flux-2-klein-9b |
| @cf/bytedance/stable-diffusion-xl-lightning | @cf/black-forest-labs/flux-2-klein-9b |
| @cf/lykon/dreamshaper-8-lcm | @cf/black-forest-labs/flux-2-klein-9b |
| @cf/openai/whisper-tiny-en | @cf/deepgram/nova-3 |
| @cf/llava-hf/llava-1.5-7b-hf | @cf/moondream/moondream3.1-9B-A2B |
| @cf/google/embeddinggemma-300m | @cf/google/embeddinggemma-2 |
One catch: the embeddings replacement, embeddinggemma-2, is marked "available soon" and is not live yet. If you use embeddings, plan for this gap now. Do not wait until the last day.
Retired Workers AI LLMs and Which Model to Use Instead
Cloudflare retires these 16 LLMs and does not map each one to a single replacement:
- @cf/deepseek-ai/deepseek-r1-distill-qwen-32b
- @cf/nvidia/nemotron-3-120b-a12b
- @cf/deepseek-ai/deepseek-v4-pro-0813
- @cf/deepseek-ai/deepseek-v4-flash-0731
- @cf/qwen/qwq-32b
- @cf/qwen/qwen3-30b-a3b-fp8
- @cf/moonshotai/kimi-k2.6
- @cf/moonshotai/kimi-k2.7-code
- @cf/zai-org/glm-5.2
- @cf/zai-org/glm-5.3-flash
- @cf/meta-llama/llama-2-7b-chat-hf-lora
- @cf/google/gemma-2b-it-lora
- @cf/google/gemma-7b-it-lora
- @cf/meta/llama-3.1-8b-instruct-fp8
- @cf/meta/llama-3.2-1b-instruct
- @cf/meta/llama-3.2-3b-instruct
Pick a replacement by workload size:
- Frontier-class quality: choose @cf/deepseek-ai/deepseek-v4.1-flash-1017 or @cf/zai-org/glm-5.3.
- Smaller, cheaper models: choose @cf/google/gemma-4-26b-a4b-it or @cf/qwen/qwen3.8-27b.
As a rough rule, move a Llama 3.2 1B or 3B app to a Gemma or Qwen model, and move a reasoning or coding app (QwQ, Kimi, DeepSeek R1 distill) to one of the frontier options.
How to Find Deprecated Workers AI Model IDs in Your Code
Search your whole project, including environment variables, config files and D1 database rows that store a model name. A grep for the @cf/ prefix finds most of them:
grep -rn "@cf/" --include="*.ts" --include="*.js" --include="*.json" --include="*.toml" .Check these places too:
- Wrangler config and
.dev.varsfiles - Cloudflare dashboard variables and secrets
- AI Gateway settings and saved prompts
- Admin panels that let users choose a model
How to Store Workers AI Model IDs in One Config Value
Hardcoded model names cause this kind of emergency. Keep each model ID in a single constant or an environment variable so future swaps take one edit:
const MODELS = {
chat: "@cf/google/gemma-4-26b-a4b-it",
image: "@cf/black-forest-labs/flux-2-klein-9b",
speech: "@cf/deepgram/nova-3",
};
const reply = await env.AI.run(MODELS.chat, {
messages: [{ role: "user", content: prompt }],
});How to Test Replacement Models Before the Deadline
A new model is not always a drop-in swap. Image, speech and vision models often accept different parameters and return different response shapes. Test each replacement with your real inputs and check these points:
- Required and optional request fields
- Response format (text, base64 image, JSON fields)
- Output quality on your actual prompts
- Latency and token usage
Cloudflare notes that pricing differs by model, so review the Workers AI pricing page before you switch a high-volume workload.
How to Handle Workers AI 410 Gone Errors (Code 5028)
Add a fallback so one missed model ID does not take your feature offline. An uncaught throw inside the Worker shows up as Cloudflare Error 1101, so wrap the call as shown below. Catch the failure, log it and retry with a current model:
async function runChat(env: Env, prompt: string) {
try {
return await env.AI.run(MODELS.chat, {
messages: [{ role: "user", content: prompt }],
});
} catch (err) {
console.error("Workers AI call failed", err);
return await env.AI.run(MODELS.fallback, {
messages: [{ role: "user", content: prompt }],
});
}
}Define MODELS.fallback as a second active model from the current catalog.
How to Verify Your Workers AI Migration After Deploy
Ship the change before November 20, then check your logs for error code 5028 for a few days. Any hit means a retired ID is still running somewhere, often in an old Worker version, a cron job or a staging environment.
Workers AI Model Migration Checklist
- Search code and config for
@cf/model IDs - Compare each ID against the retired lists above
- Replace image, speech, vision and TTS models using the table
- Choose a frontier or small LLM for each retired language model
- Make a plan for embeddings until embeddinggemma-2 goes live
- Test responses, quality and cost
- Add a 410 fallback
- Deploy before November 20 and monitor logs
Frequently Asked Questions
When do the retired Workers AI models stop working?
They stop on November 20. Cloudflare moved the date from November 15.
What error do I get after the shutdown?
Requests to a retired model return HTTP 410 Gone with error code 5028.
Which model replaces Stable Diffusion XL on Workers AI?
Cloudflare suggests @cf/black-forest-labs/flux-2-klein-9b for all four retired image models, including SDXL base, SDXL Lightning, Stable Diffusion 1.5 inpainting and DreamShaper 8 LCM.
What replaces Whisper Tiny English?
Use @cf/deepgram/nova-3 for speech to text. For text to speech, @cf/deepgram/aura-2-en replaces MeloTTS.
What should I use instead of embeddinggemma-300m?
The planned replacement is @cf/google/embeddinggemma-2, but it is not available yet. Keep an eye on the model catalog and test it once it appears.
Do I need to change my code if I use Llama 3.2 1B or 3B?
Yes. Both are retired. Move to a small current model such as Gemma 4 or Qwen 3.8, then test your prompts.
Will the new models cost the same?
Not necessarily. Pricing varies by model, so check the pricing page before moving heavy traffic.
Related Guides
- Cloudflare Bot Fight Mode: How to Whitelist Good Bots and Block Bad Bots
- How to Block AI Crawlers and Protect Your Website
- How to Stop, Detect, Prevent, and Mitigate DDoS Attacks with Cloudflare
- How Cloudflare Argo Pricing Works: A Complete Guide to Costs and Benefits
- How to Fix Cloudflare Error 521: Web Server Is Down





