Conversation
…tion Add infrastructure to auto-generate AI model documentation from the unified catalog API, with a new top-level /ai/ docs section. Infrastructure: - New catalog-models content collection with schema matching unified catalog - Fetch script supporting both API fetch and local JSON import - Model resolver that merges catalog and legacy sources (catalog wins) - New components: ExampleCard, CatalogSchemaTable, SchemaParamName, CodeSnippets - Updated ModelInfo/ModelFeatures/ModelBadges for ResolvedModel type New /ai/ product section: - src/content/docs/ai/ with landing page and models catalog - src/content/directory/ai.yaml for sidebar registration - Models now live at /ai/models/@cf/meta/llama-3.1-8b-instruct/ - Full model ID in URL matches env.AI.run() model parameter Redirects: - /workers-ai/models/* -> /ai/models/* (catch-all) - /ai/ -> /ai/models/ - 97 redirects from old slugs to new full-ID URLs - workers-ai/models/index.mdx now redirects to /ai/models/ This aligns with the 'one product' vision from the AI Gateway roadmap, where all models (Workers AI, AI Gateway, marketplace) share a unified catalog and documentation structure.
- Add Models link to AI Gateway sidebar and overview page - Add redirect /ai-gateway/models/* -> /ai/models/* - Update /ai/ overview to use Feature and RelatedProduct components - Fix model catalog to use getResolvedModels() for both collections - Fix author extraction for catalog models (google/model vs @cf/author/model) - Add kimi-k2.5 redirect, fix sandbox-sdk icon reference - Generate pages at both full model ID and short slug paths
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Move /ai-gateway/models/* and /workers-ai/models/* to end with other splats - Remove redundant /ai/ -> /ai/models/ redirect (now a real page) - Splat/dynamic redirects must come after all static redirects
This reverts commit 3348be7.
- Create /workers-ai/models/[...name].astro for legacy short slug URLs - Simplify /ai/models/[...name].astro to only serve full model ID paths - Remove ~95 model slug redirects from __redirects (pages serve directly now)
Reduces duplication between /ai/models/ and /workers-ai/models/ detail pages. Both now use the same component, differing only in route generation.
There was a problem hiding this comment.
Pull request overview
This PR refreshes the AI model catalog experience by introducing a unified /ai/models catalog (covering Workers AI + external providers), adding new catalog model entries, and updating navigation/redirects accordingly.
Changes:
- Added unified catalog model schema/types and client-safe helpers to support React components.
- Introduced new
/ai/modelsand updated/workers-ai/modelspages to use resolver-driven model data. - Added many new catalog model JSON entries and updated docs navigation + redirects to point to the unified catalog.
Reviewed changes
Copilot reviewed 102 out of 105 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util/model-types.ts | Adds client-safe unified ResolvedModel/ApiMode types for catalog + legacy models. |
| src/util/model-helpers.ts | Adds getModelAuthor() helper to normalize author parsing across ID formats. |
| src/schemas/index.ts | Re-exports the new catalog-models schema. |
| src/schemas/catalog-models.ts | Adds Zod schema + inferred types for catalog model JSON content. |
| src/pages/workers-ai/models/index.astro | Switches Workers AI models listing to resolver-driven legacy-only list + adds CTA to unified catalog. |
| src/pages/workers-ai/models/[...name].astro | Adds legacy model detail pages using short slug routing. |
| src/pages/ai/models/index.astro | Adds unified model catalog page powered by getResolvedModels(). |
| src/pages/ai/models/[...name].astro | Adds unified model detail pages powered by getResolvedModels(). |
| src/icons/ai.svg | Adds an AI icon asset. |
| src/content/docs/workers-ai/models/index.mdx | Changes Workers AI docs page to redirect to the new /workers-ai/models/ route. |
| src/content/docs/ai/related-products/workers-ai.mdx | Adds related-product navigation entry pointing to Workers AI. |
| src/content/docs/ai/related-products/vectorize.mdx | Adds related-product navigation entry pointing to Vectorize. |
| src/content/docs/ai/related-products/sandbox-sdk.mdx | Adds related-product navigation entry pointing to Sandbox SDK. |
| src/content/docs/ai/related-products/index.mdx | Adds a “Related products” navigation page with RelatedProduct tiles. |
| src/content/docs/ai/related-products/dynamic-workers.mdx | Adds related-product navigation entry pointing to Dynamic Workers. |
| src/content/docs/ai/related-products/cloudflare-agent.mdx | Adds related-product navigation entry pointing to Cloudflare Agent. |
| src/content/docs/ai/related-products/browser-rendering.mdx | Adds related-product navigation entry pointing to Browser Rendering. |
| src/content/docs/ai/related-products/ai-search.mdx | Adds related-product navigation entry pointing to AI Search. |
| src/content/docs/ai/related-products/ai-gateway.mdx | Adds related-product navigation entry pointing to AI Gateway. |
| src/content/docs/ai/related-products/ai-crawl-control.mdx | Adds related-product navigation entry pointing to AI Crawl Control. |
| src/content/docs/ai/related-products/agents.mdx | Adds related-product navigation entry pointing to Agents. |
| src/content/docs/ai/models/index.mdx | Adds docs navigation page that renders the unified model catalog page. |
| src/content/docs/ai/index.mdx | Adds AI docs landing/overview page and links into the unified model catalog. |
| src/content/docs/ai-gateway/models.mdx | Adds noindex + redirect page from old AI Gateway models docs to /ai/models/. |
| src/content/docs/ai-gateway/index.mdx | Adds “Models” feature tile linking to /ai/models/. |
| src/content/directory/ai.yaml | Adds directory entry for the new /ai/ docs section. |
| src/content/catalog-models/recraft-recraftv4-vector.json | Adds catalog entry for recraft/recraftv4-vector. |
| src/content/catalog-models/recraft-recraftv4-pro.json | Adds catalog entry for recraft/recraftv4-pro. |
| src/content/catalog-models/recraft-recraftv4-pro-vector.json | Adds catalog entry for recraft/recraftv4-pro-vector. |
| src/content/catalog-models/openai-whisper.json | Adds catalog entry for openai/whisper. |
| src/content/catalog-models/openai-tts-1.json | Adds catalog entry for openai/tts-1. |
| src/content/catalog-models/openai-tts-1-hd.json | Adds catalog entry for openai/tts-1-hd. |
| src/content/catalog-models/openai-gpt-image-1.5.json | Adds catalog entry for openai/gpt-image-1.5. |
| src/content/catalog-models/openai-gpt-4o-transcribe.json | Adds catalog entry for openai/gpt-4o-transcribe. |
| src/content/catalog-models/minimax-speech-2.8-hd.json | Adds catalog entry for minimax/speech-2.8-hd. |
| src/content/catalog-models/minimax-hailuo-2.3.json | Adds catalog entry for minimax/hailuo-2.3. |
| src/content/catalog-models/minimax-hailuo-2.3-fast.json | Adds catalog entry for minimax/hailuo-2.3-fast. |
| src/content/catalog-models/klingai-kling-v3.json | Adds catalog entry for klingai/kling-v3. |
| src/content/catalog-models/klingai-kling-v3-omni.json | Adds catalog entry for klingai/kling-v3-omni. |
| src/content/catalog-models/klingai-kling-v3-image.json | Adds catalog entry for klingai/kling-v3-image. |
| src/content/catalog-models/google-veo-3.1.json | Adds catalog entry for google/veo-3.1. |
| src/content/catalog-models/google-veo-3.1-fast.json | Adds catalog entry for google/veo-3.1-fast. |
| src/content/catalog-models/google-veo-3-fast.json | Adds catalog entry for google/veo-3-fast. |
| src/content/catalog-models/google-nano-banana.json | Adds catalog entry for google/nano-banana. |
| src/content/catalog-models/google-nano-banana-pro.json | Adds catalog entry for google/nano-banana-pro. |
| src/content/catalog-models/google-nano-banana-2.json | Adds catalog entry for google/nano-banana-2. |
| src/content/catalog-models/google-imagen-4.json | Adds catalog entry for google/imagen-4. |
| src/content/catalog-models/cloudflare-video.json | Adds catalog entry for cloudflare/video (alias). |
| src/content/catalog-models/cloudflare-tts.json | Adds catalog entry for cloudflare/tts (alias). |
| src/content/catalog-models/cloudflare-stt.json | Adds catalog entry for cloudflare/stt (alias). |
| src/content/catalog-models/cloudflare-music.json | Adds catalog entry for cloudflare/music (alias). |
| src/content/catalog-models/cloudflare-image.json | Adds catalog entry for cloudflare/image (alias). |
| src/content/catalog-models/cloudflare-image-edit.json | Adds catalog entry for cloudflare/image-edit (alias). |
| src/content/catalog-models/cloudflare-i2v.json | Adds catalog entry for cloudflare/i2v (alias). |
| src/content/catalog-models/bytedance-seedream-4.0.json | Adds catalog entry for bytedance/seedream-4.0. |
| src/content/catalog-models/black-forest-labs-flux-2-klein-9b.json | Adds catalog entry for black-forest-labs/flux-2-klein-9b. |
| src/content/catalog-models/alibaba-wan-2.6-image.json | Adds catalog entry for alibaba/wan-2.6-image. |
| src/content.config.ts | Registers the new catalog-models collection in Astro content. |
| src/components/models/types.ts | Adds shared SchemaRowData type for schema rendering components. |
| src/components/models/SchemaViewer.astro | Removes old schema viewer implementation (Stoplight tree + recursive rows). |
| src/components/models/SchemaVariantSelector.tsx | Adds UI to toggle between schema variants (e.g., Prompt vs Messages). |
| src/components/models/SchemaRow.astro | Removes old schema row renderer used by the removed schema viewer. |
| src/components/models/ModelInfo.tsx | Updates model info rendering to support unified ResolvedModel + hosting label. |
| src/components/models/ModelFeatures.tsx | Broadens accepted model type to include unified ResolvedModel. |
| src/components/models/ModelBadges.tsx | Broadens accepted model type to include unified ResolvedModel. |
| src/components/models/ExampleCard.astro | Adds a new example/code rendering card (tabs + optional image output). |
| src/components/models/CopyableCode.astro | Adds a copy-to-clipboard UI component for code/text. |
| src/components/ModelCatalog.tsx | Updates catalog to use unified ResolvedModel, improved author parsing, new routing behavior, and layout tweaks. |
| public/__redirects | Updates redirects to point legacy model/task URLs to the unified catalog and adds /ai-gateway/models/* redirect. |
| bin/compare-model-sources.ts | Adds a utility script to compare legacy vs catalog model coverage and migration progress. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Build failure ( |
|
/bonk review this |
|
Based on my comprehensive review of this PR, I've verified the changes and found the implementation to be solid. Here's my assessment: Review SummaryBuild Status: ✅ Passes ( Key Changes Verified:
Issues Found: None blocking. The implementation follows established patterns and the type check passes cleanly. Notable Implementation Details:
The PR successfully creates a unified model catalog experience while maintaining backward compatibility through redirects. The component architecture is modular and the catalog model schema is well-designed for future extensibility. |
|
Hey @kodster28! Any chance you could give the thumbs up on this one? |
Summary
Improvements to the AI model catalog — updated model data, additional entries, and related page updates.
Documentation checklist