Repository navigation
Conversation
Workers AI retired @cf/stabilityai/stable-diffusion-xl-base-1.0 and @cf/meta/llama-3.1-8b-instruct-fp8 on 2026-11-20, which broke text-to-image-template and the chat in llm-chat-app-template. text-to-image-template now uses @cf/black-forest-labs/flux-2-klein-9b, the recommended replacement. It takes multipart input, returns a base64 image, and can reject a generated image with error 3030, so the Worker retries once on 3030 and sets Content-Type from the image bytes. llm-chat-app-template now uses @cf/google/gemma-4-26b-a4b-it with reasoning turned off, since the chat UI only shows the answer.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workers AI retired 24 models on 2026-11-20. Two published templates call one of them:
text-to-image-templateused@cf/stabilityai/stable-diffusion-xl-base-1.0, so every request now fails. Its live demo returns 500, which also failssupplemental-checkon every open PR.llm-chat-app-templateused@cf/meta/llama-3.1-8b-instruct-fp8, so/api/chatreturns 500.Changes
text-to-image-templatenow uses@cf/black-forest-labs/flux-2-klein-9b, the replacement the changelog recommends. It takes multipart form data and returns a base64 image.3030("Your output has been flagged"). I saw it once in 6 calls with the template's prompt. Each call makes a new image, so the Worker retries once and returns a 503 if the retry is flagged too.Content-Typefrom the image bytes instead of hard-codingimage/png, and returns 502 if the bytes aren't a JPEG or PNG.llm-chat-app-templatenow uses@cf/google/gemma-4-26b-a4b-itwithchat_template_kwargs.enable_thinking: false, as in the Workers AI get-started guide. With reasoning on, a five-word reply took about 440 hidden reasoning chunks and 8 seconds. With it off, replies start in about a second.How I verified it
wrangler devagainst the real models:text-to-image-template: 3 of 3 requests returned a JPEG withContent-Type: image/jpeg.llm-chat-app-template: 2 prompts streamed answers with no reasoning content.playwright testfor both templates,tsc --noEmitin both,templates lint .,lint-npm-lockfiles, andprettier --checkpass.Not verified
curl;chat.jsalready readschoices[0].delta.content.