Skip to content

Add AI Gateway CRD and management API reference - #1118

Closed
blkt wants to merge 2 commits into
mainfrom
chore/ai-gateway-docs-groundwork
Closed

Add AI Gateway CRD and management API reference#1118
blkt wants to merge 2 commits into
mainfrom
chore/ai-gateway-docs-groundwork

Conversation

@blkt

@blkt blkt commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1117. Review that one first; the base will retarget to main once it merges.

What

The AI Gateway ships two CRDs (AIGateway, AIPolicy) and a REST management API, none of which were documented. Its landing page was a value-prop page ending in a "documentation in progress" admonition, so a top-level navbar tab was a dead end.

Changes

AI Gateway CRD reference. Declares a second crds: set for the stacklok-enterprise-platform project in .github/upstream-projects.yaml, sourced from enterprise/ai-gateway/charts/operator-crds/files, then regenerates. The header comment in that file already anticipated this exact case ("suites that ship more than one CRD set, e.g. enterprise platform + AI gateway"). Generates docs/platform/reference/crds-ai-gateway/ for AIGateway and AIPolicy. Sidebar placement under Govern the platform is the one manual step the pipeline does not do.

Management API reference. Registers management-api.openapi.yaml as a redocusaurus spec and adds docs/platform/reference/ai-gateway-management-api.mdx, matching the pattern of the two existing ToolHive specs. Covers /v1/info, /v1/mcp-servers, /v1/me, /v1/models, and /v1/policies.

Landing page. Replaces the admonition with pointers to the two references and to the platform install sequence. The value-prop copy above it is unchanged.

Incidental change worth a look

Regenerating also refreshed three enterprise-crds schemas, which were missing claimConditions on PlatformRoleBinding and ClusterPlatformRoleBinding and the corresponding narrowing on ToolhiveAuthorizationPolicy. That is a real staleness fix rather than churn, but it rides along because generation runs per project, not per set. Say so if you would rather it were split out.

Verification

npm run build succeeds, so no broken links. New routes render: /platform/reference/crds-ai-gateway/aigateway, /aipolicy, and /platform/reference/ai-gateway-management-api. tsc --noEmit and prettier --check are clean.

Two notes for the pipeline

  • The CRD generators emit unwrapped markdown; a prettier --write pass is needed afterwards or the generated MDX lands reformatted against the repo style.
  • The spec declares servers: [{url: management.invalid/}], which Redoc will render verbatim. Left as-is rather than editing a copied upstream asset, but it reads oddly and is worth fixing at the source.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview Aug 25, 2026 6:48pm

Request Review

The chat assistant was removed from the Cloud UI on 2026-08-04
(`b9a4893fb1ac`, a breaking change that deleted the `/api/chat` route,
its system prompt, and the whole `components/chat/` tree). The docs have
described it as a live feature ever since.

Removes the `AI assistant` page and every reference to it: the feature
bullet and Next steps link in `intro.mdx` and `browse-catalog.mdx`, the
`OPENROUTER_API_KEY` prerequisite, commented env example, and env-var
table row in `configure.mdx`, and the `assistant` directive rows in the
Cloud UI feature-flags section and the Enterprise Manager policy index.

Both `Feature flags` sections lost their only real content and are gone
or reduced accordingly. The deleted page gets a permanent redirect to
the Cloud UI section index.

Note for a separate platform-repo cleanup: the `assistant` directive
still exists server-side (`config-server/config/config.go`) and in
cloud-ui's generated types, but nothing consumes it now.
The AI Gateway ships two CRDs, `AIGateway` and `AIPolicy`, and a REST
management API, none of which were documented. Its landing page was a
value-prop page ending in a "documentation in progress" note, so the
navbar tab was a dead end.

Declares a second `crds:` set for the platform project in
.github/upstream-projects.yaml, sourced from the ai-gateway operator-crds
chart, and regenerates. The header comment in that file already
anticipated this case ("enterprise platform + AI gateway"). Sidebar
placement under `Govern the platform` is the one manual step.

Adds `crd-intros.mjs` entries for both kinds, with a new `aiGateway`
group. Without them the landing page files these two under "Shared
configuration", the DocCards read "Is the top-level resource for..." and
truncate mid-sentence, and both pages fall back to a bare "Schema
reference for X" meta description. The overrides also drop the upstream
description's reference to the Envoy Gateway resources the operator
manages.

Registers `management-api.openapi.yaml` as a redocusaurus spec and adds
the reference page, matching the two existing ToolHive specs.

Rewrites the AI Gateway landing page: the admonition is replaced by
pointers to the CRD and API references and to the platform install.

Incidental: regenerating also refreshed three `enterprise-crds` schemas,
which were missing `claimConditions` on the role-binding kinds. That is a
real staleness fix, not churn, but it rides along because generation runs
per project rather than per set. Generated MDX needs a `prettier --write`
pass afterwards or it lands unwrapped.
@blkt
blkt force-pushed the chore/ai-gateway-docs-groundwork branch from 97d56e8 to 14c4581 Compare August 25, 2026 18:47
Base automatically changed from chore/remove-stale-cloud-ui-docs to main August 25, 2026 20:09
@blkt blkt closed this Aug 26, 2026
@blkt
blkt deleted the chore/ai-gateway-docs-groundwork branch August 26, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant