Skip to content

WIP: Catalog improvements#29507

Open
superhighfives wants to merge 36 commits intoproductionfrom
feat/catalog-models
Open

WIP: Catalog improvements#29507
superhighfives wants to merge 36 commits intoproductionfrom
feat/catalog-models

Conversation

@superhighfives
Copy link
Copy Markdown
Contributor

Summary

Improves the catalog on Cloudflare Docs.

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

…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
Copilot AI review requested due to automatic review settings April 1, 2026 00:47
@github-actions github-actions bot added product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ size/xl labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Preview URL: https://b18917dd.preview.developers.cloudflare.com
Preview Branch URL: https://feat-catalog-models.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers-ai/guides/tutorials/explore-workers-ai-models-using-a-jupyter-notebook/ https://feat-catalog-models.preview.developers.cloudflare.com/workers-ai/guides/tutorials/explore-workers-ai-models-using-a-jupyter-notebook/
https://developers.cloudflare.com/ai/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/
https://developers.cloudflare.com/ai/related-products/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/
https://developers.cloudflare.com/ai-gateway/models/ https://feat-catalog-models.preview.developers.cloudflare.com/ai-gateway/models/
https://developers.cloudflare.com/ai/models/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/models/
https://developers.cloudflare.com/workers-ai/models/ https://feat-catalog-models.preview.developers.cloudflare.com/workers-ai/models/
https://developers.cloudflare.com/ai-gateway/ https://feat-catalog-models.preview.developers.cloudflare.com/ai-gateway/
https://developers.cloudflare.com/ai/related-products/agents/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/agents/
https://developers.cloudflare.com/ai/related-products/ai-crawl-control/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/ai-crawl-control/
https://developers.cloudflare.com/ai/related-products/ai-gateway/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/ai-gateway/
https://developers.cloudflare.com/ai/related-products/ai-search/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/ai-search/
https://developers.cloudflare.com/ai/related-products/browser-rendering/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/browser-rendering/
https://developers.cloudflare.com/ai/related-products/cloudflare-agent/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/cloudflare-agent/
https://developers.cloudflare.com/ai/related-products/dynamic-workers/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/dynamic-workers/
https://developers.cloudflare.com/ai/related-products/sandbox-sdk/ https://feat-catalog-models.preview.developers.cloudflare.com/ai/related-products/sandbox-sdk/

- 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.
- Split schemas into API modes (Sync, Streaming, Batch) shown as accordions
- Add Input/Output tabs within each mode
- Add Prompt/Messages variant selector for input formats
- Replace old schema components with new SchemaTree and SchemaDisplay
- Add collapsible rows, search filter, nullable type collapsing
- Delete unused CatalogSchemaTable, SchemaViewer, SchemaRow, SchemaParamName
- Remove border divider above OR separators
- Use dashed lines for OR dividers
- Always show scrollbars on parameter list
- Match API Schemas styling with Parameters section
- Convert Prompt/Messages to side-by-side button selector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.