Open
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
Contributor
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.
- 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
71c3997 to
e45cff7
Compare
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.
Summary
Improves the catalog on Cloudflare Docs.
Documentation checklist