From 216bf8b53cbdd8774c1af85a349a448c0afec9c6 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Mon, 5 Oct 2026 19:37:27 +0530 Subject: [PATCH 01/11] fix(website): write a distinct summary for 57 model pages The Router descriptions gave 55 hub model pages a summary shared with a sibling page (24 groups), and Krea 2 Large and Medium near-duplicated each other. An editorial summary per page slug now overrides the derived one; every fact comes from the Router contracts or catalogue. --- .../src/config/workshop-browse-content.ts | 14 ++++- .../src/data/workshop-model-summaries.json | 59 +++++++++++++++++++ 2 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 apps/website/src/data/workshop-model-summaries.json diff --git a/apps/website/src/config/workshop-browse-content.ts b/apps/website/src/config/workshop-browse-content.ts index 7f331836c5e..824affc9b1c 100644 --- a/apps/website/src/config/workshop-browse-content.ts +++ b/apps/website/src/config/workshop-browse-content.ts @@ -4,6 +4,7 @@ import indexJson from '@/content/workshop-router-index.json' import aliasesJson from '@/content/workshop-router-aliases.json' import displayNames from '@/data/workshop-router-display-names.json' import useCaseOverrides from '@/data/workshop-use-case-overrides.json' +import summaryOverrides from '@/data/workshop-model-summaries.json' import { workshopDisplayEntriesSchema } from '@/content/workshop-display.schema' import { workshopModelSchema } from '@/content/workshop-models.schema' import type { WorkshopModelEntry } from '@/content/workshop-models.schema' @@ -76,6 +77,10 @@ function taskForUseCases( export const workshopDisplayEntries = workshopDisplayEntriesSchema.parse(displayJson) const displaySlugs = new Set(workshopDisplayEntries.map((entry) => entry.slug)) +const editorialSummaries = new Map(Object.entries(summaryOverrides)) +for (const slug of editorialSummaries.keys()) + if (!displaySlugs.has(slug)) + throw new Error(`Model summary names an unknown page: ${slug}`) for (const slug of modelOrderRank.keys()) if (!displaySlugs.has(slug)) throw new Error(`Recommended model order names an unknown page: ${slug}`) @@ -160,6 +165,11 @@ const browseModels: readonly RouterWorkshopModel[] = contentSources.map( canonicalNames.get(record.id) ?? entry.displayName const provider = providerName(entry.provider) + const summary = + editorialSummaries.get(slug) ?? + (entry.description + ? modelSummary(entry.description, name, provider) + : undefined) return { slug, name, @@ -180,9 +190,7 @@ const browseModels: readonly RouterWorkshopModel[] = contentSources.map( thumbnail: { url: thumbnail.url, kind: thumbnail.kind } } : {}), - ...(entry.description - ? { summary: modelSummary(entry.description, name, provider) } - : {}), + ...(summary ? { summary } : {}), ...(overlay.status === 'deprecated' ? { status: 'deprecated' as const } : {}) diff --git a/apps/website/src/data/workshop-model-summaries.json b/apps/website/src/data/workshop-model-summaries.json new file mode 100644 index 00000000000..50762a5789b --- /dev/null +++ b/apps/website/src/data/workshop-model-summaries.json @@ -0,0 +1,59 @@ +{ + "bfl--flux-2-pro--generate-images": "Generates an image from text and up to 9 reference images, at 256–2048 px per side.", + "byteplus--seedance-2-fast-reference--generate-videos": "Fast tier of Seedance 2.0: mixes up to 9 images, 3 videos and 3 audio clips into a 4–15 second video at 480p or 720p.", + "byteplus--seedance-2-fast-text-to-video--generate-videos": "Fast tier of Seedance 2.0: turns a prompt alone into a 4–15 second clip with synchronized audio, at 480p or 720p.", + "byteplus--seedance-2-reference--generate-videos": "Standard (non-Fast) Seedance 2.0: combines a prompt with up to 9 images, 3 videos and 3 audio clips into one video.", + "byteplus--seedance-2-text-to-video--generate-videos": "Standard (non-Fast) Seedance 2.0 from text only: a 4–15 second clip with synchronized audio, in seven aspect ratios or adaptive.", + "byteplus--seedream-4--edit-images": "Edits your source images from a text instruction, using up to 10 reference images, at output sizes up to 4096×4096.", + "byteplus--seedream-4--generate-images": "Generates images from a text prompt at sizes up to 4096×4096, and can return a batch of related images in one run.", + "byteplus--seedream-4-5--edit-images": "Edits source images with the 4.5 model, which outputs at least 3.68 MP and up to 4096×4096.", + "byteplus--seedream-4-5--generate-images": "Generates images from text with the 4.5 model at a minimum of 3.68 MP, with optional batch output of related images.", + "byteplus--seedream-5-lite--edit-images": "Edits images from an instruction with up to 14 reference images, saved as PNG or JPEG at sizes up to 3072×3072.", + "byteplus--seedream-5-lite--generate-images": "Generates images from text at up to 3072×3072 (3K) as PNG or JPEG, with optional batch generation of related images.", + "byteplus--seedream-5-pro--edit-images": "Pro-model editing with up to 10 references, giving 1K, 1.5K or 2K images as PNG or JPEG.", + "byteplus--seedream-5-pro--generate-images": "Generates one image from text on the Pro model at 1K, 1.5K or 2K; no batch output.", + "gemini--omni-1.1-flash--animate-images": "Animates a starting image into a 3–10 second video with audio on the 1.1 release, from 360p up to 4K.", + "gemini--omni-1.1-flash--edit-videos": "Edits an existing video from a written instruction on the 1.1 release, and can keep refining the same clip over several turns.", + "gemini--omni-1.1-flash--generate-videos": "Writes a 3–10 second video with audio from a prompt alone on the 1.1 release, landscape or portrait, at 360p to 4K.", + "gemini--omni-flash-preview--animate-images": "Preview release: turns a still image into a 3–10 second video with sound, from a 360p draft up to 4K.", + "gemini--omni-flash-preview--edit-videos": "Preview release: changes an existing video from a text instruction, and later turns can adjust the same clip.", + "gemini--omni-flash-preview--generate-videos": "Preview release: creates a video with sound from text only, 16:9 or 9:16, at 360p, 720p, 1080p or 4K.", + "kling--text-to-video--generate-videos": "Generates a video from a prompt of up to 2,500 characters in 16:9, 9:16 or 1:1, with an optional negative prompt and camera control.", + "krea--krea-2-large--generate-images": "Photorealism-focused Krea 2 model: renders expressive photographic images from text, with an optional Krea moodboard and style references.", + "krea--krea-2-medium--generate-images": "Illustration-focused Krea 2 model: draws expressive illustrations from text, steered by up to 10 style reference images.", + "luma--ray-2-text-to-video--generate-videos": "Generates a 5 or 9 second video from text at 540p to 4K, in seven aspect ratios including 21:9, with an option to loop.", + "luma_2--uni-1-image-generation--generate-images": "Generates an image from text and up to 9 reference images, in ratios from 3:1 to 1:3, with a manga style and optional web search.", + "openai--gpt-image-2--generate-images": "Generates images from text at low, medium or high quality, with transparent or opaque backgrounds and sizes up to 3840×2160.", + "openai--gpt-image-2.5-flare--generate-images": "Flare variant of GPT Image 2.5: renders text inside images, with five quality levels including standard and HD.", + "openai--gpt-image-2.5-sunburst--generate-images": "Sunburst variant of GPT Image 2.5: PNG, WebP or JPEG output, transparent backgrounds, and sizes up to 3840×2160.", + "qwen--qwen-image-3.0-image-edit--edit-images": "Edits one to three input images from a text instruction, returning up to 6 results per run with optional prompt rewriting.", + "qwen--qwen-image-3.0-pro-image-edit--edit-images": "Higher-quality Pro tier of Qwen Image 3.0 editing: takes one to three images plus an instruction and an optional negative prompt.", + "recraft--v3-text-to-vector--generate-images": "Generates an SVG from a prompt of up to 1,000 characters, with optional vector substyles such as line art, engraving and linocut.", + "recraft--v4-text-to-vector--generate-images": "Generates up to 6 SVG illustrations per run from prompts as long as 10,000 characters, in square, landscape or portrait sizes.", + "recraft--v4.1-pro-text-to-image--generate-images": "Pro raster tier of V4.1: up to 6 images per prompt at 2048×2048, or wide and tall formats such as 2688×1536.", + "recraft--v4.1-pro-text-to-vector--generate-images": "Pro tier of V4.1 vector output: SVG illustrations from text in seven aspect ratios, including 1:1, 16:9 and 9:16, up to 6 per run.", + "recraft--v4.1-text-to-image--generate-images": "Standard raster tier of V4.1: up to 6 images per prompt at 1024×1024, or wide and tall sizes such as 1344×768.", + "recraft--v4.1-text-to-vector--generate-images": "Standard V4.1 vector model: turns a text prompt into scalable SVG artwork in square, landscape or portrait ratios.", + "recraft--v4.1-utility-pro-text-to-image--generate-images": "Utility Pro raster variant: images from text at 2048×2048, 2560×1664 or their portrait versions, up to 6 per run.", + "recraft--v4.1-utility-pro-text-to-vector--generate-images": "Utility Pro vector variant: produces SVG files from a prompt at an aspect ratio you choose, such as 3:2, 4:3 or 9:16.", + "recraft--v4.1-utility-text-to-image--generate-images": "Utility raster variant at standard resolution: images from text at 1024×1024, 1280×832 or 832×1280, up to 6 per run.", + "recraft--v4.1-utility-text-to-vector--generate-images": "Utility vector variant: creates SVG illustrations from a text prompt of up to 10,000 characters.", + "vertexai--gemini-2.5-flash-image--edit-images": "Edits an uploaded image from a text instruction on Gemini 2.5 Flash Image, with up to 14 reference images.", + "vertexai--gemini-2.5-flash-image--generate-images": "Text-to-image on Gemini 2.5 Flash Image, the original Nano Banana model, in ten fixed aspect ratios or auto.", + "vertexai--gemini-3-pro-image--edit-images": "Edits images on Gemini 3 Pro Image and returns them at 1K, 2K or 4K, guided by optional reference images and documents.", + "vertexai--gemini-3-pro-image--generate-images": "Generates high-quality images from text on Gemini 3 Pro Image at a chosen 1K, 2K or 4K resolution.", + "vertexai--gemini-nano-banana-2--edit-images": "Edits images on Gemini 3.1 Flash Image using up to 14 references, with 1K, 2K or 4K output and minimal or high thinking.", + "vertexai--gemini-nano-banana-2--generate-images": "Generates images from text on Gemini 3.1 Flash Image at up to 4K, with an adjustable thinking level (minimal or high).", + "vertexai--veo-3--animate-images": "Animates a starting image into a 4, 6 or 8 second video with optional native audio, at 720p, 1080p or 4K in 16:9 or 9:16.", + "vertexai--veo-3--generate-videos": "Generates a 4, 6 or 8 second video from a text prompt alone, with native audio and an optional negative prompt, at up to 4K.", + "wan--happyhorse-video-edit--edit-videos": "Edits an uploaded video from a prompt, guided by up to 5 reference images, at 720P or 1080P in five aspect ratios.", + "wan--text-to-video--generate-videos": "Generates a 5, 10 or 15 second video from text, with optional driving audio and single-shot or multi-shot output with cuts.", + "wan--text-to-video-2.7--generate-videos": "Generates a 2–15 second video from text at 720P or 1080P, with an optional audio track to drive it and a negative prompt.", + "wan--video-edit-2.7--edit-videos": "Edits an uploaded video from a prompt with up to 4 reference images, can keep the original audio, and outputs 2–10 seconds.", + "wavespeed--seedvr2-image--edit-images": "Upscales a single image to 2K, 4K or 8K with the SeedVR2 model, saved as JPEG, PNG or WebP.", + "wavespeed--ultimate-image-upscaler--edit-images": "Raises one image to a 2K, 4K or 8K target with the Ultimate upscaler, as JPEG, PNG or WebP.", + "xai--grok-imagine-video--animate-images": "Animates a start image into a 1–15 second video at 480p or 720p from a prompt.", + "xai--grok-imagine-video--generate-videos": "Generates a 1–15 second video from text alone at 480p or 720p, in seven aspect ratios.", + "xai--grok-imagine-video-1.5--animate-images": "Turns a start image into a 1–15 second clip at up to 1080p, above the original's 720p.", + "xai--grok-imagine-video-1.5--generate-videos": "Generates a 1–15 second video from a text prompt at 480p, 720p or 1080p, in aspect ratios from 1:1 to 16:9 and 9:16." +} From 0af84941d60b01e655ef47e3f7a6af44d0993a57 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Mon, 5 Oct 2026 19:40:21 +0530 Subject: [PATCH 02/11] test(website): fail on any duplicate model summary The allowlist of known duplicate groups is empty now, so the guard fails on every summary shared by two pages. --- .../config/workshop-browse-content.test.ts | 191 +----------------- 1 file changed, 2 insertions(+), 189 deletions(-) diff --git a/apps/website/src/config/workshop-browse-content.test.ts b/apps/website/src/config/workshop-browse-content.test.ts index 0b8cd3e4afc..f8debc8518b 100644 --- a/apps/website/src/config/workshop-browse-content.test.ts +++ b/apps/website/src/config/workshop-browse-content.test.ts @@ -141,211 +141,24 @@ describe('model availability', () => { }) }) -const KNOWN_DUPLICATE_SUMMARIES: ReadonlyArray< - readonly [string, readonly string[]] -> = [ - [ - 'Generates an image from text with up to 9 reference images.', - [ - 'bfl--flux-2-pro--generate-images', - 'luma_2--uni-1-image-generation--generate-images' - ] - ], - [ - 'Generates a video from a mix of reference images, videos, and audio.', - [ - 'byteplus--seedance-2-fast-reference--generate-videos', - 'byteplus--seedance-2-reference--generate-videos' - ] - ], - [ - 'Generates a short video clip with audio from text.', - [ - 'byteplus--seedance-2-fast-text-to-video--generate-videos', - 'byteplus--seedance-2-text-to-video--generate-videos' - ] - ], - [ - 'Generates or edits an image at up to ~4K with up to 10 reference images.', - [ - 'byteplus--seedream-4--edit-images', - 'byteplus--seedream-4--generate-images' - ] - ], - [ - 'Generates or edits an image with higher quality than 4.0, minimum 3.68MP.', - [ - 'byteplus--seedream-4-5--edit-images', - 'byteplus--seedream-4-5--generate-images' - ] - ], - [ - 'Generates or edits an image with up to 14 reference images, PNG output.', - [ - 'byteplus--seedream-5-lite--edit-images', - 'byteplus--seedream-5-lite--generate-images' - ] - ], - [ - 'Generates or edits a 1K or 2K image with up to 10 references.', - [ - 'byteplus--seedream-5-pro--edit-images', - 'byteplus--seedream-5-pro--generate-images' - ] - ], - [ - 'Generates or edits video with audio through Gemini Omni 1.1 interactions. Length (3-10s) is set in the prompt; 360p to 4k.', - [ - 'gemini--omni-1.1-flash--animate-images', - 'gemini--omni-1.1-flash--edit-videos', - 'gemini--omni-1.1-flash--generate-videos' - ] - ], - [ - 'Generates or edits video with audio through Gemini Omni Flash interactions. Length (3-10s) is set in the prompt; 360p to 4k.', - [ - 'gemini--omni-flash-preview--animate-images', - 'gemini--omni-flash-preview--edit-videos', - 'gemini--omni-flash-preview--generate-videos' - ] - ], - [ - 'Generates a cinematic video clip from text.', - [ - 'kling--text-to-video--generate-videos', - 'luma--ray-2-text-to-video--generate-videos' - ] - ], - [ - 'Generates or edits an image with top-tier text rendering, 1K/2K/4K output, reference images, and optional mask inpainting.', - [ - 'openai--gpt-image-2--generate-images', - 'openai--gpt-image-2.5-flare--generate-images', - 'openai--gpt-image-2.5-sunburst--generate-images' - ] - ], - [ - 'Edits one to three images.', - [ - 'qwen--qwen-image-3.0-image-edit--edit-images', - 'qwen--qwen-image-3.0-pro-image-edit--edit-images' - ] - ], - [ - 'Generates an SVG illustration from a text prompt.', - [ - 'recraft--v3-text-to-vector--generate-images', - 'recraft--v4-text-to-vector--generate-images' - ] - ], - [ - 'Generates raster images.', - [ - 'recraft--v4.1-pro-text-to-image--generate-images', - 'recraft--v4.1-text-to-image--generate-images', - 'recraft--v4.1-utility-pro-text-to-image--generate-images', - 'recraft--v4.1-utility-text-to-image--generate-images' - ] - ], - [ - 'Generates SVG illustrations.', - [ - 'recraft--v4.1-pro-text-to-vector--generate-images', - 'recraft--v4.1-text-to-vector--generate-images', - 'recraft--v4.1-utility-pro-text-to-vector--generate-images', - 'recraft--v4.1-utility-text-to-vector--generate-images' - ] - ], - [ - 'Generates or edits an image quickly with up to 14 reference images (Gemini 2.5 Flash Image / Nano Banana).', - [ - 'vertexai--gemini-2.5-flash-image--edit-images', - 'vertexai--gemini-2.5-flash-image--generate-images' - ] - ], - [ - 'Generates a high-quality image with selectable 1K/2K/4K resolution (Gemini 3 Pro Image).', - [ - 'vertexai--gemini-3-pro-image--edit-images', - 'vertexai--gemini-3-pro-image--generate-images' - ] - ], - [ - 'Generates or edits images at up to 4K with up to 14 reference images and adjustable thinking (Nano Banana 2 / Gemini 3.1 Flash Image).', - [ - 'vertexai--gemini-nano-banana-2--edit-images', - 'vertexai--gemini-nano-banana-2--generate-images' - ] - ], - [ - 'Generates a cinematic video clip with native audio from text.', - ['vertexai--veo-3--animate-images', 'vertexai--veo-3--generate-videos'] - ], - [ - 'Edits an existing video from a prompt and optional reference images.', - [ - 'wan--happyhorse-video-edit--edit-videos', - 'wan--video-edit-2.7--edit-videos' - ] - ], - [ - 'Generates a video clip from text with optional driving audio.', - [ - 'wan--text-to-video--generate-videos', - 'wan--text-to-video-2.7--generate-videos' - ] - ], - [ - 'Upscales an image to 2K/4K/8K with sharp, detailed results.', - [ - 'wavespeed--seedvr2-image--edit-images', - 'wavespeed--ultimate-image-upscaler--edit-images' - ] - ], - [ - 'Generates a short video clip from text or a start frame.', - [ - 'xai--grok-imagine-video--animate-images', - 'xai--grok-imagine-video--generate-videos' - ] - ], - [ - 'Generates a 1–15 second video at up to 1080p from text or a start frame.', - [ - 'xai--grok-imagine-video-1.5--animate-images', - 'xai--grok-imagine-video-1.5--generate-videos' - ] - ] -] - function normaliseSummary(summary: string): string { return summary.trim().toLowerCase().replace(/\s+/g, ' ') } describe('model summaries', () => { - it('ships no duplicate summary beyond the known groups', () => { + it('ships no summary shared by two pages', () => { const slugsBySummary = new Map() for (const { slug, summary } of workshopModels) { if (!summary) continue const key = normaliseSummary(summary) slugsBySummary.set(key, [...(slugsBySummary.get(key) ?? []), slug]) } - const known = new Map( - KNOWN_DUPLICATE_SUMMARIES.map(([summary, slugs]) => [ - normaliseSummary(summary), - slugs - ]) - ) - expect(known.size).toBe(KNOWN_DUPLICATE_SUMMARIES.length) const problems = [...slugsBySummary] .filter(([, slugs]) => slugs.length > 1) - .filter(([key, slugs]) => - slugs.some((slug) => !known.get(key)?.includes(slug)) - ) .map( ([key, slugs]) => - `Duplicate summary on ${slugs.join(', ')}: "${key}". Summaries come from the partner descriptions imported by scripts/generate-workshop-catalog.ts; get those made distinct upstream.` + `Duplicate summary on ${slugs.join(', ')}: "${key}". Write a distinct one per page in src/data/workshop-model-summaries.json.` ) expect(problems).toEqual([]) From 199bc2e472ea78b698bb40485a0ccf5430b922d6 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Mon, 5 Oct 2026 19:43:09 +0530 Subject: [PATCH 03/11] fix(website): reject an empty editorial model summary --- apps/website/src/config/workshop-browse-content.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/website/src/config/workshop-browse-content.ts b/apps/website/src/config/workshop-browse-content.ts index 824affc9b1c..3df5481c200 100644 --- a/apps/website/src/config/workshop-browse-content.ts +++ b/apps/website/src/config/workshop-browse-content.ts @@ -78,9 +78,9 @@ export const workshopDisplayEntries = workshopDisplayEntriesSchema.parse(displayJson) const displaySlugs = new Set(workshopDisplayEntries.map((entry) => entry.slug)) const editorialSummaries = new Map(Object.entries(summaryOverrides)) -for (const slug of editorialSummaries.keys()) - if (!displaySlugs.has(slug)) - throw new Error(`Model summary names an unknown page: ${slug}`) +for (const [slug, summary] of editorialSummaries) + if (!displaySlugs.has(slug) || !summary.trim()) + throw new Error(`Invalid model summary for page: ${slug}`) for (const slug of modelOrderRank.keys()) if (!displaySlugs.has(slug)) throw new Error(`Recommended model order names an unknown page: ${slug}`) From ddeff05295bf08ef7a3c13df4f6be086f27d9337 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Mon, 5 Oct 2026 19:51:10 +0530 Subject: [PATCH 04/11] fix(website): lead every model summary with a verb A summary that opens with a label ("Preview release:") gives the meta description two colons in a row after the model name. --- .../src/data/workshop-model-summaries.json | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/website/src/data/workshop-model-summaries.json b/apps/website/src/data/workshop-model-summaries.json index 50762a5789b..7028ed09b32 100644 --- a/apps/website/src/data/workshop-model-summaries.json +++ b/apps/website/src/data/workshop-model-summaries.json @@ -1,9 +1,9 @@ { "bfl--flux-2-pro--generate-images": "Generates an image from text and up to 9 reference images, at 256–2048 px per side.", - "byteplus--seedance-2-fast-reference--generate-videos": "Fast tier of Seedance 2.0: mixes up to 9 images, 3 videos and 3 audio clips into a 4–15 second video at 480p or 720p.", - "byteplus--seedance-2-fast-text-to-video--generate-videos": "Fast tier of Seedance 2.0: turns a prompt alone into a 4–15 second clip with synchronized audio, at 480p or 720p.", - "byteplus--seedance-2-reference--generate-videos": "Standard (non-Fast) Seedance 2.0: combines a prompt with up to 9 images, 3 videos and 3 audio clips into one video.", - "byteplus--seedance-2-text-to-video--generate-videos": "Standard (non-Fast) Seedance 2.0 from text only: a 4–15 second clip with synchronized audio, in seven aspect ratios or adaptive.", + "byteplus--seedance-2-fast-reference--generate-videos": "Mixes up to 9 images, 3 videos and 3 audio clips into a 4–15 second video on the Fast tier, at 480p or 720p.", + "byteplus--seedance-2-fast-text-to-video--generate-videos": "Turns a prompt alone into a 4–15 second clip with synchronized audio on the Fast tier, at 480p or 720p.", + "byteplus--seedance-2-reference--generate-videos": "Combines a prompt with up to 9 images, 3 videos and 3 audio clips into one video on the standard, non-Fast model.", + "byteplus--seedance-2-text-to-video--generate-videos": "Generates a 4–15 second clip with synchronized audio from text only on the standard model, in seven aspect ratios or adaptive.", "byteplus--seedream-4--edit-images": "Edits your source images from a text instruction, using up to 10 reference images, at output sizes up to 4096×4096.", "byteplus--seedream-4--generate-images": "Generates images from a text prompt at sizes up to 4096×4096, and can return a batch of related images in one run.", "byteplus--seedream-4-5--edit-images": "Edits source images with the 4.5 model, which outputs at least 3.68 MP and up to 4096×4096.", @@ -15,29 +15,29 @@ "gemini--omni-1.1-flash--animate-images": "Animates a starting image into a 3–10 second video with audio on the 1.1 release, from 360p up to 4K.", "gemini--omni-1.1-flash--edit-videos": "Edits an existing video from a written instruction on the 1.1 release, and can keep refining the same clip over several turns.", "gemini--omni-1.1-flash--generate-videos": "Writes a 3–10 second video with audio from a prompt alone on the 1.1 release, landscape or portrait, at 360p to 4K.", - "gemini--omni-flash-preview--animate-images": "Preview release: turns a still image into a 3–10 second video with sound, from a 360p draft up to 4K.", - "gemini--omni-flash-preview--edit-videos": "Preview release: changes an existing video from a text instruction, and later turns can adjust the same clip.", - "gemini--omni-flash-preview--generate-videos": "Preview release: creates a video with sound from text only, 16:9 or 9:16, at 360p, 720p, 1080p or 4K.", + "gemini--omni-flash-preview--animate-images": "Turns a still image into a 3–10 second video with sound on the preview release, from a 360p draft up to 4K.", + "gemini--omni-flash-preview--edit-videos": "Changes an existing video from a text instruction on the preview release; later turns can adjust the same clip.", + "gemini--omni-flash-preview--generate-videos": "Creates a video with sound from text only on the preview release, 16:9 or 9:16, at 360p, 720p, 1080p or 4K.", "kling--text-to-video--generate-videos": "Generates a video from a prompt of up to 2,500 characters in 16:9, 9:16 or 1:1, with an optional negative prompt and camera control.", - "krea--krea-2-large--generate-images": "Photorealism-focused Krea 2 model: renders expressive photographic images from text, with an optional Krea moodboard and style references.", - "krea--krea-2-medium--generate-images": "Illustration-focused Krea 2 model: draws expressive illustrations from text, steered by up to 10 style reference images.", + "krea--krea-2-large--generate-images": "Renders expressive photorealistic images from text, with an optional Krea moodboard and style references.", + "krea--krea-2-medium--generate-images": "Draws expressive illustrations from text, steered by an optional moodboard and up to 10 style reference images.", "luma--ray-2-text-to-video--generate-videos": "Generates a 5 or 9 second video from text at 540p to 4K, in seven aspect ratios including 21:9, with an option to loop.", "luma_2--uni-1-image-generation--generate-images": "Generates an image from text and up to 9 reference images, in ratios from 3:1 to 1:3, with a manga style and optional web search.", "openai--gpt-image-2--generate-images": "Generates images from text at low, medium or high quality, with transparent or opaque backgrounds and sizes up to 3840×2160.", - "openai--gpt-image-2.5-flare--generate-images": "Flare variant of GPT Image 2.5: renders text inside images, with five quality levels including standard and HD.", - "openai--gpt-image-2.5-sunburst--generate-images": "Sunburst variant of GPT Image 2.5: PNG, WebP or JPEG output, transparent backgrounds, and sizes up to 3840×2160.", + "openai--gpt-image-2.5-flare--generate-images": "Renders text inside generated images, with five quality levels including standard and HD, in the Flare variant.", + "openai--gpt-image-2.5-sunburst--generate-images": "Generates images as PNG, WebP or JPEG with transparent backgrounds and sizes up to 3840×2160, in the Sunburst variant.", "qwen--qwen-image-3.0-image-edit--edit-images": "Edits one to three input images from a text instruction, returning up to 6 results per run with optional prompt rewriting.", - "qwen--qwen-image-3.0-pro-image-edit--edit-images": "Higher-quality Pro tier of Qwen Image 3.0 editing: takes one to three images plus an instruction and an optional negative prompt.", + "qwen--qwen-image-3.0-pro-image-edit--edit-images": "Edits one to three images on the higher-quality Pro tier, from an instruction and an optional negative prompt.", "recraft--v3-text-to-vector--generate-images": "Generates an SVG from a prompt of up to 1,000 characters, with optional vector substyles such as line art, engraving and linocut.", "recraft--v4-text-to-vector--generate-images": "Generates up to 6 SVG illustrations per run from prompts as long as 10,000 characters, in square, landscape or portrait sizes.", - "recraft--v4.1-pro-text-to-image--generate-images": "Pro raster tier of V4.1: up to 6 images per prompt at 2048×2048, or wide and tall formats such as 2688×1536.", - "recraft--v4.1-pro-text-to-vector--generate-images": "Pro tier of V4.1 vector output: SVG illustrations from text in seven aspect ratios, including 1:1, 16:9 and 9:16, up to 6 per run.", - "recraft--v4.1-text-to-image--generate-images": "Standard raster tier of V4.1: up to 6 images per prompt at 1024×1024, or wide and tall sizes such as 1344×768.", - "recraft--v4.1-text-to-vector--generate-images": "Standard V4.1 vector model: turns a text prompt into scalable SVG artwork in square, landscape or portrait ratios.", - "recraft--v4.1-utility-pro-text-to-image--generate-images": "Utility Pro raster variant: images from text at 2048×2048, 2560×1664 or their portrait versions, up to 6 per run.", - "recraft--v4.1-utility-pro-text-to-vector--generate-images": "Utility Pro vector variant: produces SVG files from a prompt at an aspect ratio you choose, such as 3:2, 4:3 or 9:16.", - "recraft--v4.1-utility-text-to-image--generate-images": "Utility raster variant at standard resolution: images from text at 1024×1024, 1280×832 or 832×1280, up to 6 per run.", - "recraft--v4.1-utility-text-to-vector--generate-images": "Utility vector variant: creates SVG illustrations from a text prompt of up to 10,000 characters.", + "recraft--v4.1-pro-text-to-image--generate-images": "Generates up to 6 raster images per prompt at 2048×2048, or wide and tall formats such as 2688×1536.", + "recraft--v4.1-pro-text-to-vector--generate-images": "Generates up to 6 SVG illustrations per prompt on the Pro tier, in seven aspect ratios including 1:1, 16:9 and 9:16.", + "recraft--v4.1-text-to-image--generate-images": "Generates up to 6 raster images per prompt at 1024×1024, or wide and tall sizes such as 1344×768.", + "recraft--v4.1-text-to-vector--generate-images": "Turns a text prompt into scalable SVG artwork in square, landscape or portrait ratios.", + "recraft--v4.1-utility-pro-text-to-image--generate-images": "Makes raster images from text at 2048×2048, 2560×1664 or their portrait versions on the Utility Pro tier.", + "recraft--v4.1-utility-pro-text-to-vector--generate-images": "Produces SVG files from a prompt on the Utility Pro tier, at an aspect ratio you choose, such as 3:2, 4:3 or 9:16.", + "recraft--v4.1-utility-text-to-image--generate-images": "Makes raster images from text at 1024×1024, 1280×832 or 832×1280 on the Utility tier, up to 6 per run.", + "recraft--v4.1-utility-text-to-vector--generate-images": "Creates SVG illustrations on the Utility tier from a text prompt of up to 10,000 characters.", "vertexai--gemini-2.5-flash-image--edit-images": "Edits an uploaded image from a text instruction on Gemini 2.5 Flash Image, with up to 14 reference images.", "vertexai--gemini-2.5-flash-image--generate-images": "Text-to-image on Gemini 2.5 Flash Image, the original Nano Banana model, in ten fixed aspect ratios or auto.", "vertexai--gemini-3-pro-image--edit-images": "Edits images on Gemini 3 Pro Image and returns them at 1K, 2K or 4K, guided by optional reference images and documents.", From 1e1d3c70f8e6313da52358ab85938ec018ef3f86 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Mon, 5 Oct 2026 21:57:49 +0530 Subject: [PATCH 05/11] fix(website): accept editorial summaries only for model pages, trimmed An override keyed to an app page passed validation and was then dropped without a word; it now fails the build. The stored summary is the trimmed one the check validated. --- apps/website/src/config/workshop-browse-content.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/website/src/config/workshop-browse-content.ts b/apps/website/src/config/workshop-browse-content.ts index 3df5481c200..958b5049f0c 100644 --- a/apps/website/src/config/workshop-browse-content.ts +++ b/apps/website/src/config/workshop-browse-content.ts @@ -77,9 +77,19 @@ function taskForUseCases( export const workshopDisplayEntries = workshopDisplayEntriesSchema.parse(displayJson) const displaySlugs = new Set(workshopDisplayEntries.map((entry) => entry.slug)) -const editorialSummaries = new Map(Object.entries(summaryOverrides)) +const modelPageSlugs = new Set( + workshopDisplayEntries + .filter((entry) => entry.type === undefined || entry.type === 'MODEL') + .map((entry) => entry.slug) +) +const editorialSummaries = new Map( + Object.entries(summaryOverrides).map(([slug, summary]) => [ + slug, + summary.trim() + ]) +) for (const [slug, summary] of editorialSummaries) - if (!displaySlugs.has(slug) || !summary.trim()) + if (!modelPageSlugs.has(slug) || !summary) throw new Error(`Invalid model summary for page: ${slug}`) for (const slug of modelOrderRank.keys()) if (!displaySlugs.has(slug)) From c5e5e2fda6adac6a474af035f9b540fccb94ffad Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Tue, 6 Oct 2026 13:59:41 +0530 Subject: [PATCH 06/11] fix(website): qualify API-only features in model summaries Batch output, Recraft counts above one, Kling camera control and Seedance video and audio references exist in the Router API but not on the page's form, so the summaries now say via the API. Seedream 5.0 Pro offers 1K or 2K, the Nano Banana edit form takes up to 4 images, and every summary leads with a verb. --- .../src/data/workshop-model-summaries.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/website/src/data/workshop-model-summaries.json b/apps/website/src/data/workshop-model-summaries.json index 7028ed09b32..67179729401 100644 --- a/apps/website/src/data/workshop-model-summaries.json +++ b/apps/website/src/data/workshop-model-summaries.json @@ -1,24 +1,24 @@ { "bfl--flux-2-pro--generate-images": "Generates an image from text and up to 9 reference images, at 256–2048 px per side.", - "byteplus--seedance-2-fast-reference--generate-videos": "Mixes up to 9 images, 3 videos and 3 audio clips into a 4–15 second video on the Fast tier, at 480p or 720p.", + "byteplus--seedance-2-fast-reference--generate-videos": "Mixes up to 4 reference images, plus video and audio clips via the API, into a 4–15 second Fast-tier video.", "byteplus--seedance-2-fast-text-to-video--generate-videos": "Turns a prompt alone into a 4–15 second clip with synchronized audio on the Fast tier, at 480p or 720p.", - "byteplus--seedance-2-reference--generate-videos": "Combines a prompt with up to 9 images, 3 videos and 3 audio clips into one video on the standard, non-Fast model.", + "byteplus--seedance-2-reference--generate-videos": "Combines a prompt with up to 4 reference images, plus video and audio clips via the API, on the standard model.", "byteplus--seedance-2-text-to-video--generate-videos": "Generates a 4–15 second clip with synchronized audio from text only on the standard model, in seven aspect ratios or adaptive.", "byteplus--seedream-4--edit-images": "Edits your source images from a text instruction, using up to 10 reference images, at output sizes up to 4096×4096.", - "byteplus--seedream-4--generate-images": "Generates images from a text prompt at sizes up to 4096×4096, and can return a batch of related images in one run.", + "byteplus--seedream-4--generate-images": "Generates images from a text prompt at sizes up to 4096×4096, and can return a batch of related images via the API.", "byteplus--seedream-4-5--edit-images": "Edits source images with the 4.5 model, which outputs at least 3.68 MP and up to 4096×4096.", - "byteplus--seedream-4-5--generate-images": "Generates images from text with the 4.5 model at a minimum of 3.68 MP, with optional batch output of related images.", + "byteplus--seedream-4-5--generate-images": "Generates images from text with the 4.5 model at a minimum of 3.68 MP, with batch output of related images via the API.", "byteplus--seedream-5-lite--edit-images": "Edits images from an instruction with up to 14 reference images, saved as PNG or JPEG at sizes up to 3072×3072.", - "byteplus--seedream-5-lite--generate-images": "Generates images from text at up to 3072×3072 (3K) as PNG or JPEG, with optional batch generation of related images.", - "byteplus--seedream-5-pro--edit-images": "Pro-model editing with up to 10 references, giving 1K, 1.5K or 2K images as PNG or JPEG.", - "byteplus--seedream-5-pro--generate-images": "Generates one image from text on the Pro model at 1K, 1.5K or 2K; no batch output.", + "byteplus--seedream-5-lite--generate-images": "Generates images from text at up to 3072×3072 (3K) as PNG or JPEG, with batch generation via the API.", + "byteplus--seedream-5-pro--edit-images": "Edits images on the Pro model with up to 10 references, as 1K or 2K PNG or JPEG files.", + "byteplus--seedream-5-pro--generate-images": "Generates one image from text on the Pro model at 1K or 2K; no batch output.", "gemini--omni-1.1-flash--animate-images": "Animates a starting image into a 3–10 second video with audio on the 1.1 release, from 360p up to 4K.", "gemini--omni-1.1-flash--edit-videos": "Edits an existing video from a written instruction on the 1.1 release, and can keep refining the same clip over several turns.", "gemini--omni-1.1-flash--generate-videos": "Writes a 3–10 second video with audio from a prompt alone on the 1.1 release, landscape or portrait, at 360p to 4K.", "gemini--omni-flash-preview--animate-images": "Turns a still image into a 3–10 second video with sound on the preview release, from a 360p draft up to 4K.", "gemini--omni-flash-preview--edit-videos": "Changes an existing video from a text instruction on the preview release; later turns can adjust the same clip.", "gemini--omni-flash-preview--generate-videos": "Creates a video with sound from text only on the preview release, 16:9 or 9:16, at 360p, 720p, 1080p or 4K.", - "kling--text-to-video--generate-videos": "Generates a video from a prompt of up to 2,500 characters in 16:9, 9:16 or 1:1, with an optional negative prompt and camera control.", + "kling--text-to-video--generate-videos": "Generates a video from a prompt of up to 2,500 characters in 16:9, 9:16 or 1:1, with a negative prompt, plus camera control via the API.", "krea--krea-2-large--generate-images": "Renders expressive photorealistic images from text, with an optional Krea moodboard and style references.", "krea--krea-2-medium--generate-images": "Draws expressive illustrations from text, steered by an optional moodboard and up to 10 style reference images.", "luma--ray-2-text-to-video--generate-videos": "Generates a 5 or 9 second video from text at 540p to 4K, in seven aspect ratios including 21:9, with an option to loop.", @@ -29,17 +29,17 @@ "qwen--qwen-image-3.0-image-edit--edit-images": "Edits one to three input images from a text instruction, returning up to 6 results per run with optional prompt rewriting.", "qwen--qwen-image-3.0-pro-image-edit--edit-images": "Edits one to three images on the higher-quality Pro tier, from an instruction and an optional negative prompt.", "recraft--v3-text-to-vector--generate-images": "Generates an SVG from a prompt of up to 1,000 characters, with optional vector substyles such as line art, engraving and linocut.", - "recraft--v4-text-to-vector--generate-images": "Generates up to 6 SVG illustrations per run from prompts as long as 10,000 characters, in square, landscape or portrait sizes.", - "recraft--v4.1-pro-text-to-image--generate-images": "Generates up to 6 raster images per prompt at 2048×2048, or wide and tall formats such as 2688×1536.", - "recraft--v4.1-pro-text-to-vector--generate-images": "Generates up to 6 SVG illustrations per prompt on the Pro tier, in seven aspect ratios including 1:1, 16:9 and 9:16.", - "recraft--v4.1-text-to-image--generate-images": "Generates up to 6 raster images per prompt at 1024×1024, or wide and tall sizes such as 1344×768.", + "recraft--v4-text-to-vector--generate-images": "Generates SVG illustrations from prompts as long as 10,000 characters, in square, landscape or portrait sizes, up to 6 per run via the API.", + "recraft--v4.1-pro-text-to-image--generate-images": "Generates raster images at 2048×2048, or wide and tall formats such as 2688×1536, up to 6 per prompt via the API.", + "recraft--v4.1-pro-text-to-vector--generate-images": "Generates SVG illustrations on the Pro tier in seven aspect ratios including 1:1, 16:9 and 9:16, up to 6 per prompt via the API.", + "recraft--v4.1-text-to-image--generate-images": "Generates raster images at 1024×1024, or wide and tall sizes such as 1344×768, up to 6 per prompt via the API.", "recraft--v4.1-text-to-vector--generate-images": "Turns a text prompt into scalable SVG artwork in square, landscape or portrait ratios.", "recraft--v4.1-utility-pro-text-to-image--generate-images": "Makes raster images from text at 2048×2048, 2560×1664 or their portrait versions on the Utility Pro tier.", "recraft--v4.1-utility-pro-text-to-vector--generate-images": "Produces SVG files from a prompt on the Utility Pro tier, at an aspect ratio you choose, such as 3:2, 4:3 or 9:16.", - "recraft--v4.1-utility-text-to-image--generate-images": "Makes raster images from text at 1024×1024, 1280×832 or 832×1280 on the Utility tier, up to 6 per run.", + "recraft--v4.1-utility-text-to-image--generate-images": "Makes raster images from text at 1024×1024, 1280×832 or 832×1280 on the Utility tier, up to 6 per run via the API.", "recraft--v4.1-utility-text-to-vector--generate-images": "Creates SVG illustrations on the Utility tier from a text prompt of up to 10,000 characters.", - "vertexai--gemini-2.5-flash-image--edit-images": "Edits an uploaded image from a text instruction on Gemini 2.5 Flash Image, with up to 14 reference images.", - "vertexai--gemini-2.5-flash-image--generate-images": "Text-to-image on Gemini 2.5 Flash Image, the original Nano Banana model, in ten fixed aspect ratios or auto.", + "vertexai--gemini-2.5-flash-image--edit-images": "Edits up to 4 uploaded images from a text instruction on Gemini 2.5 Flash Image, in ten fixed aspect ratios.", + "vertexai--gemini-2.5-flash-image--generate-images": "Generates images from text on Gemini 2.5 Flash Image, the original Nano Banana model, in ten fixed aspect ratios.", "vertexai--gemini-3-pro-image--edit-images": "Edits images on Gemini 3 Pro Image and returns them at 1K, 2K or 4K, guided by optional reference images and documents.", "vertexai--gemini-3-pro-image--generate-images": "Generates high-quality images from text on Gemini 3 Pro Image at a chosen 1K, 2K or 4K resolution.", "vertexai--gemini-nano-banana-2--edit-images": "Edits images on Gemini 3.1 Flash Image using up to 14 references, with 1K, 2K or 4K output and minimal or high thinking.", From ea058f5e6c8cca1956c5931917465718e0386b23 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Tue, 6 Oct 2026 13:59:48 +0530 Subject: [PATCH 07/11] fix(website): warn about summaries for pages a build does not publish --- apps/website/src/config/workshop-browse-content.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/website/src/config/workshop-browse-content.ts b/apps/website/src/config/workshop-browse-content.ts index 958b5049f0c..2a9ca05a645 100644 --- a/apps/website/src/config/workshop-browse-content.ts +++ b/apps/website/src/config/workshop-browse-content.ts @@ -144,6 +144,13 @@ export const authoredRouterContentBySlug = new Map( export const routerContentBySlug = new Map( publishedContentSources.map((source) => [source.overlay.slug, source]) ) +const unpublishedSummarySlugs = [...editorialSummaries.keys()].filter( + (slug) => !routerContentBySlug.has(slug) +) +if (unpublishedSummarySlugs.length) + console.warn( + `Model summaries kept for pages this build does not publish: ${unpublishedSummarySlugs.join(', ')}` + ) export const routerContentById = new Map( routerIndex.flatMap((record) => { const sources = publishedContentSources.filter( From c68d791a47a80bfedf87bc38f7201ad0723bd407 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Tue, 6 Oct 2026 14:05:07 +0530 Subject: [PATCH 08/11] test(website): require a summary on every model page --- apps/website/src/config/workshop-browse-content.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/website/src/config/workshop-browse-content.test.ts b/apps/website/src/config/workshop-browse-content.test.ts index f8debc8518b..cd71767e91a 100644 --- a/apps/website/src/config/workshop-browse-content.test.ts +++ b/apps/website/src/config/workshop-browse-content.test.ts @@ -146,6 +146,14 @@ function normaliseSummary(summary: string): string { } describe('model summaries', () => { + it('gives every model page a summary', () => { + const missing = workshopModels + .filter(({ summary }) => !summary?.trim()) + .map(({ slug }) => slug) + + expect(missing).toEqual([]) + }) + it('ships no summary shared by two pages', () => { const slugsBySummary = new Map() for (const { slug, summary } of workshopModels) { From 7ee39d3a491ab885600809506efb3c8035c41fb7 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Tue, 6 Oct 2026 14:10:01 +0530 Subject: [PATCH 09/11] docs(website): say the banner lines win over page summaries --- apps/website/src/lib/workshop/banner-summary.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/website/src/lib/workshop/banner-summary.ts b/apps/website/src/lib/workshop/banner-summary.ts index 38f72dc8a4c..be178540177 100644 --- a/apps/website/src/lib/workshop/banner-summary.ts +++ b/apps/website/src/lib/workshop/banner-summary.ts @@ -1,9 +1,11 @@ // The banner centres its column inside a frame of one height, so a summary // that runs to two lines pushes the buttons under it down by a line and they -// move as the carousel turns. A catalogue summary is written for the model -// page, where the room is there; these are the same models said short enough -// to stand on one line at the banner's measure. A model with no line here -// keeps its own summary, which the banner clamps rather than wraps. +// move as the carousel turns. A page summary (src/data/workshop-model-summaries.json +// or the catalogue) is written for the model page, where the room is there; +// these are the same models said short enough to stand on one line at the +// banner's measure, and they win over the page summary on the banner only. A +// model with no line here keeps its own summary, which the banner clamps +// rather than wraps. const BANNER_SUMMARIES: Record = { 'openai--gpt-image-2--generate-images': 'Generates or edits an image, and renders text unusually well.', From 8084a7d098486fe0b1b18b8e815869a1fb395dd7 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Tue, 6 Oct 2026 14:28:32 +0530 Subject: [PATCH 10/11] fix(website): qualify API-only Krea, Wan, Omni, Gemini and reference counts Moodboards, style references, driving audio, shot type, negative prompts, multi-turn edits and reference counts above the form's limit exist only in the Router API, so the summaries now say via the API or give the form's limit. The unsourced Gemini 3.1 thinking level and 14-reference count, and the HappyHorse aspect ratios and reference counts, are removed. --- .../src/data/workshop-model-summaries.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/website/src/data/workshop-model-summaries.json b/apps/website/src/data/workshop-model-summaries.json index 67179729401..3757e5fdfa9 100644 --- a/apps/website/src/data/workshop-model-summaries.json +++ b/apps/website/src/data/workshop-model-summaries.json @@ -8,21 +8,21 @@ "byteplus--seedream-4--generate-images": "Generates images from a text prompt at sizes up to 4096×4096, and can return a batch of related images via the API.", "byteplus--seedream-4-5--edit-images": "Edits source images with the 4.5 model, which outputs at least 3.68 MP and up to 4096×4096.", "byteplus--seedream-4-5--generate-images": "Generates images from text with the 4.5 model at a minimum of 3.68 MP, with batch output of related images via the API.", - "byteplus--seedream-5-lite--edit-images": "Edits images from an instruction with up to 14 reference images, saved as PNG or JPEG at sizes up to 3072×3072.", + "byteplus--seedream-5-lite--edit-images": "Edits images from an instruction with up to 10 reference images (14 via the API), as PNG or JPEG at up to 3072×3072.", "byteplus--seedream-5-lite--generate-images": "Generates images from text at up to 3072×3072 (3K) as PNG or JPEG, with batch generation via the API.", "byteplus--seedream-5-pro--edit-images": "Edits images on the Pro model with up to 10 references, as 1K or 2K PNG or JPEG files.", "byteplus--seedream-5-pro--generate-images": "Generates one image from text on the Pro model at 1K or 2K; no batch output.", "gemini--omni-1.1-flash--animate-images": "Animates a starting image into a 3–10 second video with audio on the 1.1 release, from 360p up to 4K.", - "gemini--omni-1.1-flash--edit-videos": "Edits an existing video from a written instruction on the 1.1 release, and can keep refining the same clip over several turns.", + "gemini--omni-1.1-flash--edit-videos": "Edits an existing video from a written instruction on the 1.1 release, with multi-turn refinement via the API.", "gemini--omni-1.1-flash--generate-videos": "Writes a 3–10 second video with audio from a prompt alone on the 1.1 release, landscape or portrait, at 360p to 4K.", "gemini--omni-flash-preview--animate-images": "Turns a still image into a 3–10 second video with sound on the preview release, from a 360p draft up to 4K.", - "gemini--omni-flash-preview--edit-videos": "Changes an existing video from a text instruction on the preview release; later turns can adjust the same clip.", + "gemini--omni-flash-preview--edit-videos": "Changes an existing video from a text instruction on the preview release, plus follow-up edit turns via the API.", "gemini--omni-flash-preview--generate-videos": "Creates a video with sound from text only on the preview release, 16:9 or 9:16, at 360p, 720p, 1080p or 4K.", "kling--text-to-video--generate-videos": "Generates a video from a prompt of up to 2,500 characters in 16:9, 9:16 or 1:1, with a negative prompt, plus camera control via the API.", - "krea--krea-2-large--generate-images": "Renders expressive photorealistic images from text, with an optional Krea moodboard and style references.", - "krea--krea-2-medium--generate-images": "Draws expressive illustrations from text, steered by an optional moodboard and up to 10 style reference images.", + "krea--krea-2-large--generate-images": "Renders expressive photorealistic images from text, and accepts a Krea moodboard and style references via the API.", + "krea--krea-2-medium--generate-images": "Draws expressive illustrations from text, and accepts a moodboard and up to 10 style reference images via the API.", "luma--ray-2-text-to-video--generate-videos": "Generates a 5 or 9 second video from text at 540p to 4K, in seven aspect ratios including 21:9, with an option to loop.", - "luma_2--uni-1-image-generation--generate-images": "Generates an image from text and up to 9 reference images, in ratios from 3:1 to 1:3, with a manga style and optional web search.", + "luma_2--uni-1-image-generation--generate-images": "Generates an image from text and an optional reference image (up to 9 via the API), in ratios from 3:1 to 1:3, with manga style and web search.", "openai--gpt-image-2--generate-images": "Generates images from text at low, medium or high quality, with transparent or opaque backgrounds and sizes up to 3840×2160.", "openai--gpt-image-2.5-flare--generate-images": "Renders text inside generated images, with five quality levels including standard and HD, in the Flare variant.", "openai--gpt-image-2.5-sunburst--generate-images": "Generates images as PNG, WebP or JPEG with transparent backgrounds and sizes up to 3840×2160, in the Sunburst variant.", @@ -42,14 +42,14 @@ "vertexai--gemini-2.5-flash-image--generate-images": "Generates images from text on Gemini 2.5 Flash Image, the original Nano Banana model, in ten fixed aspect ratios.", "vertexai--gemini-3-pro-image--edit-images": "Edits images on Gemini 3 Pro Image and returns them at 1K, 2K or 4K, guided by optional reference images and documents.", "vertexai--gemini-3-pro-image--generate-images": "Generates high-quality images from text on Gemini 3 Pro Image at a chosen 1K, 2K or 4K resolution.", - "vertexai--gemini-nano-banana-2--edit-images": "Edits images on Gemini 3.1 Flash Image using up to 14 references, with 1K, 2K or 4K output and minimal or high thinking.", - "vertexai--gemini-nano-banana-2--generate-images": "Generates images from text on Gemini 3.1 Flash Image at up to 4K, with an adjustable thinking level (minimal or high).", + "vertexai--gemini-nano-banana-2--edit-images": "Edits up to 4 source images on Gemini 3.1 Flash Image from a prompt, with 1K, 2K or 4K output in ten aspect ratios.", + "vertexai--gemini-nano-banana-2--generate-images": "Generates images from text on Gemini 3.1 Flash Image at 1K, 2K or 4K, in ten aspect ratios including 21:9.", "vertexai--veo-3--animate-images": "Animates a starting image into a 4, 6 or 8 second video with optional native audio, at 720p, 1080p or 4K in 16:9 or 9:16.", "vertexai--veo-3--generate-videos": "Generates a 4, 6 or 8 second video from a text prompt alone, with native audio and an optional negative prompt, at up to 4K.", - "wan--happyhorse-video-edit--edit-videos": "Edits an uploaded video from a prompt, guided by up to 5 reference images, at 720P or 1080P in five aspect ratios.", - "wan--text-to-video--generate-videos": "Generates a 5, 10 or 15 second video from text, with optional driving audio and single-shot or multi-shot output with cuts.", - "wan--text-to-video-2.7--generate-videos": "Generates a 2–15 second video from text at 720P or 1080P, with an optional audio track to drive it and a negative prompt.", - "wan--video-edit-2.7--edit-videos": "Edits an uploaded video from a prompt with up to 4 reference images, can keep the original audio, and outputs 2–10 seconds.", + "wan--happyhorse-video-edit--edit-videos": "Edits an uploaded video from a prompt and an optional reference image at 720P or 1080P, with an option to keep the original audio.", + "wan--text-to-video--generate-videos": "Generates a 5, 10 or 15 second video from text, with driving audio and single-shot or multi-shot output via the API.", + "wan--text-to-video-2.7--generate-videos": "Generates a 2–15 second video from text at 720P or 1080P, with a driving audio track and a negative prompt via the API.", + "wan--video-edit-2.7--edit-videos": "Edits an uploaded video from a prompt and an optional reference image into a 2–10 second clip, and can keep the original audio via the API.", "wavespeed--seedvr2-image--edit-images": "Upscales a single image to 2K, 4K or 8K with the SeedVR2 model, saved as JPEG, PNG or WebP.", "wavespeed--ultimate-image-upscaler--edit-images": "Raises one image to a 2K, 4K or 8K target with the Ultimate upscaler, as JPEG, PNG or WebP.", "xai--grok-imagine-video--animate-images": "Animates a start image into a 1–15 second video at 480p or 720p from a prompt.", From b0bc18299ca23e68477a49bab89554e2df6387d8 Mon Sep 17 00:00:00 2001 From: Maanil Verma Date: Tue, 6 Oct 2026 14:52:50 +0530 Subject: [PATCH 11/11] refactor(website): split summary and field logic out of browseModels Move summary-override validation, the unpublished-summary warning, use-case correction, media gating, display naming and summary choice into small pure functions with direct tests. Output is unchanged. --- .../config/workshop-browse-content.test.ts | 122 +++++++++++++++++ .../src/config/workshop-browse-content.ts | 127 +++++++++++++----- 2 files changed, 217 insertions(+), 32 deletions(-) diff --git a/apps/website/src/config/workshop-browse-content.test.ts b/apps/website/src/config/workshop-browse-content.test.ts index cd71767e91a..0efebd7a5bb 100644 --- a/apps/website/src/config/workshop-browse-content.test.ts +++ b/apps/website/src/config/workshop-browse-content.test.ts @@ -4,8 +4,14 @@ import { assertNoModelSlugAliasCollisions, authoredRouterModelSlugAliases, authoredWorkshopModels, + correctedUseCase, + editorialSummariesFor, + modelDisplayName, + modelSummaryFor, + publishableMedia, routerModelSlugAliases, routerWorkshopModelPaths, + unpublishedSummaryWarning, workshopModels } from './workshop-browse-content' import { @@ -172,3 +178,119 @@ describe('model summaries', () => { expect(problems).toEqual([]) }) }) + +describe('editorial summary overrides', () => { + it('trims each override for a model page', () => { + expect( + editorialSummariesFor({ 'a--b': ' Distinct copy. ' }, new Set(['a--b'])) + ).toEqual(new Map([['a--b', 'Distinct copy.']])) + }) + + it.for([ + { + case: 'a page that is not a model page', + slug: 'missing', + summary: 'Copy.' + }, + { case: 'a blank override', slug: 'a--b', summary: ' ' } + ])('rejects $case', ({ slug, summary }) => { + expect(() => + editorialSummariesFor({ [slug]: summary }, new Set(['a--b'])) + ).toThrow(`Invalid model summary for page: ${slug}`) + }) + + it('warns only about overrides for pages this build does not publish', () => { + expect(unpublishedSummaryWarning(['a', 'b', 'c'], new Set(['b']))).toBe( + 'Model summaries kept for pages this build does not publish: a, c' + ) + expect(unpublishedSummaryWarning(['b'], new Set(['b']))).toBeUndefined() + }) + + it.for([ + { + editorial: 'Editorial.', + description: 'Draws images.', + summary: 'Editorial.' + }, + { + editorial: undefined, + description: 'Draws images (Model).', + summary: 'Draws images.' + }, + { editorial: undefined, description: '', summary: undefined } + ])( + 'summarises $description with editorial $editorial as $summary', + ({ editorial, description, summary }) => { + expect( + modelSummaryFor(editorial, description, { + name: 'Model', + provider: 'Provider' + }) + ).toBe(summary) + } + ) +}) + +describe('browse model fields', () => { + it('applies the entry override before the Router override and the authored use case', () => { + const overrides = new Map([ + ['entry', 'edit-images' as const], + ['router', 'audio' as const] + ]) + expect( + [ + { entryId: 'entry', routerId: 'router' }, + { entryId: 'other', routerId: 'router' }, + { entryId: 'other', routerId: 'other' } + ].map((ids) => correctedUseCase(overrides, ids, 'generate-images')) + ).toEqual(['edit-images', 'audio', 'generate-images']) + }) + + it('withholds media from a page whose media shows the wrong model', () => { + const thumbnail = { + url: 'https://example.com/t.png', + kind: 'image' as const + } + const media = { thumbnail, samples: Array(8).fill(thumbnail) } + expect(publishableMedia(media, false)).toEqual({ + exampleCount: 6, + thumbnail + }) + expect(publishableMedia({}, false)).toEqual({ + exampleCount: 0, + thumbnail: undefined + }) + expect(publishableMedia(media, true)).toEqual({ + exampleCount: 0, + thumbnail: undefined + }) + }) + + it.for([ + { + case: 'the authored name', + names: { authored: 'Authored', canonical: 'Canonical', shared: 2 }, + expected: 'Authored' + }, + { + case: 'the entry name when models share a Router use case', + names: { canonical: 'Canonical', shared: 2 }, + expected: 'Entry' + }, + { + case: 'the canonical name', + names: { canonical: 'Canonical', shared: 1 }, + expected: 'Canonical' + }, + { case: 'the entry name', names: {}, expected: 'Entry' } + ])('names a model with $case', ({ names, expected }) => { + expect( + modelDisplayName({ + authored: names.authored, + canonical: names.canonical, + entry: 'Entry', + modelsSharingRouterUseCase: names.shared + }) + ).toBe(expected) + }) +}) diff --git a/apps/website/src/config/workshop-browse-content.ts b/apps/website/src/config/workshop-browse-content.ts index 2a9ca05a645..313c3314ea3 100644 --- a/apps/website/src/config/workshop-browse-content.ts +++ b/apps/website/src/config/workshop-browse-content.ts @@ -8,6 +8,7 @@ import summaryOverrides from '@/data/workshop-model-summaries.json' import { workshopDisplayEntriesSchema } from '@/content/workshop-display.schema' import { workshopModelSchema } from '@/content/workshop-models.schema' import type { WorkshopModelEntry } from '@/content/workshop-models.schema' +import type { WorkshopDisplayEntry } from '@/content/workshop-display.schema' import type { Modality, UseCase, RouterWorkshopModel } from './models-catalogue' import { USE_CASES } from './models-catalogue' import { workshopRouterIndexSchema } from './workshop-router-index' @@ -82,15 +83,24 @@ const modelPageSlugs = new Set( .filter((entry) => entry.type === undefined || entry.type === 'MODEL') .map((entry) => entry.slug) ) -const editorialSummaries = new Map( - Object.entries(summaryOverrides).map(([slug, summary]) => [ - slug, - summary.trim() - ]) + +export function editorialSummariesFor( + overrides: Readonly>, + pageSlugs: ReadonlySet +): ReadonlyMap { + const summaries = new Map( + Object.entries(overrides).map(([slug, summary]) => [slug, summary.trim()]) + ) + for (const [slug, summary] of summaries) + if (!pageSlugs.has(slug) || !summary) + throw new Error(`Invalid model summary for page: ${slug}`) + return summaries +} + +const editorialSummaries = editorialSummariesFor( + summaryOverrides, + modelPageSlugs ) -for (const [slug, summary] of editorialSummaries) - if (!modelPageSlugs.has(slug) || !summary) - throw new Error(`Invalid model summary for page: ${slug}`) for (const slug of modelOrderRank.keys()) if (!displaySlugs.has(slug)) throw new Error(`Recommended model order names an unknown page: ${slug}`) @@ -144,13 +154,23 @@ export const authoredRouterContentBySlug = new Map( export const routerContentBySlug = new Map( publishedContentSources.map((source) => [source.overlay.slug, source]) ) -const unpublishedSummarySlugs = [...editorialSummaries.keys()].filter( - (slug) => !routerContentBySlug.has(slug) -) -if (unpublishedSummarySlugs.length) - console.warn( - `Model summaries kept for pages this build does not publish: ${unpublishedSummarySlugs.join(', ')}` + +export function unpublishedSummaryWarning( + summarySlugs: Iterable, + publishedSlugs: Pick, 'has'> +): string | undefined { + const unpublished = [...summarySlugs].filter( + (slug) => !publishedSlugs.has(slug) ) + if (!unpublished.length) return undefined + return `Model summaries kept for pages this build does not publish: ${unpublished.join(', ')}` +} + +const summaryWarning = unpublishedSummaryWarning( + editorialSummaries.keys(), + routerContentBySlug +) +if (summaryWarning) console.warn(summaryWarning) export const routerContentById = new Map( routerIndex.flatMap((record) => { const sources = publishedContentSources.filter( @@ -160,33 +180,76 @@ export const routerContentById = new Map( }) ) +export function correctedUseCase( + overrides: ReadonlyMap, + ids: { entryId: string; routerId: string }, + authored: UseCase +): UseCase { + return overrides.get(ids.entryId) ?? overrides.get(ids.routerId) ?? authored +} + +export function publishableMedia( + media: WorkshopDisplayEntry['media'], + hasContentIssue: boolean +) { + if (hasContentIssue) return { exampleCount: 0, thumbnail: undefined } + return { + exampleCount: Math.min(6, media.samples?.length ?? 0), + thumbnail: media.thumbnail + } +} + +export function modelDisplayName(names: { + authored?: string + canonical?: string + entry: string + modelsSharingRouterUseCase?: number +}): string { + const disambiguated = + (names.modelsSharingRouterUseCase ?? 0) > 1 ? names.entry : undefined + return names.authored ?? disambiguated ?? names.canonical ?? names.entry +} + +export function modelSummaryFor( + editorial: string | undefined, + description: string, + model: { name: string; provider: string } +): string | undefined { + if (editorial !== undefined) return editorial + return description + ? modelSummary(description, model.name, model.provider) + : undefined +} + const browseModels: readonly RouterWorkshopModel[] = contentSources.map( ({ entry, overlay, binding, record }) => { const useCases = [ - correctedUseCases.get(entry.id) ?? - correctedUseCases.get(record.id) ?? + correctedUseCase( + correctedUseCases, + { entryId: entry.id, routerId: record.id }, overlay.useCase + ) ] - const exampleCount = Math.min( - 6, - binding.contentIssue ? 0 : (overlay.media.samples?.length ?? 0) + const { exampleCount, thumbnail } = publishableMedia( + overlay.media, + binding.contentIssue !== undefined ) - const thumbnail = binding.contentIssue ? undefined : overlay.media.thumbnail const slug = overlay.slug const recommendedRank = modelOrderRank.get(slug) - const name = - overlay.displayName ?? - ((sharedNames.get(`${record.id}:${overlay.useCase}`)?.size ?? 0) > 1 - ? entry.displayName - : undefined) ?? - canonicalNames.get(record.id) ?? - entry.displayName + const name = modelDisplayName({ + authored: overlay.displayName, + canonical: canonicalNames.get(record.id), + entry: entry.displayName, + modelsSharingRouterUseCase: sharedNames.get( + `${record.id}:${overlay.useCase}` + )?.size + }) const provider = providerName(entry.provider) - const summary = - editorialSummaries.get(slug) ?? - (entry.description - ? modelSummary(entry.description, name, provider) - : undefined) + const summary = modelSummaryFor( + editorialSummaries.get(slug), + entry.description, + { name, provider } + ) return { slug, name,