feat(ai-gateway): AI Gateway 2.0 entities#5263
Open
tomek-labuk wants to merge 55 commits into
Open
Conversation
TODO: revert this commit before release
releases to ai-gateway TODO: update this info with the actual product ids and version ids when the new API spec is in the dev portal
variables to entity_examples
to the model entity
Co-authored-by: jbaross <james.baross@konghq.com>
Co-authored-by: jbaross <james.baross@konghq.com>
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds AI Gateway entity reference documentation and supporting site configuration for rendering entity pages, examples, and schemas.
Changes:
- Adds a new
ai_gateway_entitiescollection and AI Gateway entity landing/reference pages. - Extends entity schema/example rendering to support AI Gateway API paths and UI instructions.
- Adds AI Gateway API/product metadata and updates Vite schema-fetching behavior.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
vite.config.ts |
Updates dev proxy path for API calls. |
jekyll.yml |
Registers the AI Gateway entity collection and defaults. |
app/_plugins/drops/entity_schema.rb |
Builds schema file paths from the frontmatter schema.api. |
app/_plugins/drops/entity_example/presenters/ui.rb |
Selects AI-specific UI instructions for AI Gateway examples. |
app/_plugins/drops/entity_example/presenters/konnect-api.rb |
Adds AI Gateway base URL and variables for Konnect API examples. |
app/_plugins/drops/entity_example/presenters/admin-api.rb |
Adds AI Gateway Admin API base URL handling. |
app/_landing_pages/ai-gateway/entities.yaml |
Adds an AI Gateway entities landing page. |
app/_includes/components/entity_example/format/ui_ai.md |
Adds UI instructions for AI Gateway entity examples. |
app/_data/products/ai-gateway.yml |
Adds AI Gateway release metadata. |
app/_data/konnect_oas_data.json |
Adds AI Gateway API metadata. |
app/_data/entity_examples/config.yml |
Adds AI Gateway entity example URL/variable config. |
app/_assets/javascripts/apps/EntitySchema.vue |
Changes schema fetching implementation. |
app/_api/konnect/ai-gateway/_index.md |
Adds AI Gateway API product index metadata. |
app/_ai_gateway_entities/vault.md |
Adds AI Vault reference page. |
app/_ai_gateway_entities/provider.md |
Adds AI Provider reference page. |
app/_ai_gateway_entities/policy.md |
Adds AI Policy reference page. |
app/_ai_gateway_entities/model.md |
Adds AI Model reference page. |
app/_ai_gateway_entities/mcp-server.md |
Adds AI MCP Server reference page. |
app/_ai_gateway_entities/data-plane-certificate.md |
Adds AI Data Plane Certificate reference page. |
app/_ai_gateway_entities/consumer.md |
Adds AI Consumer reference page. |
app/_ai_gateway_entities/consumer-group.md |
Adds AI Consumer Group reference page. |
app/_ai_gateway_entities/consumer-credential.md |
Adds AI Consumer Credential reference page. |
app/_ai_gateway_entities/ai-gateway.md |
Adds top-level AI Gateway entity reference page. |
app/_ai_gateway_entities/agent.md |
Adds AI Agent reference page. |
api-specs/konnect/ai-gateway/v2/openapi.yaml |
Adds AI Gateway OpenAPI stub. |
Comments suppressed due to low confidence (1)
app/_data/entity_examples/config.yml:117
- Only
modelandpolicyKonnect endpoints were added, but the new AI entity pages also useentity_exampletypes such asprovider,agent,mcp-server, andconsumer-credential, so those Konnect API examples will render missing or inherited endpoints instead of valid AI Gateway paths.
model: '/models'
policy: '/policies'
Comment on lines
+60
to
+66
| ai_provider: '/providers/' | ||
| ai_model: '/models/' | ||
| ai_agent: '/agents/' | ||
| ai_mcp_server: '/mcp-servers/' | ||
| ai_policy: '/policies/' | ||
| ai_consumer: '/consumers/' | ||
| ai_consumer_group: '/consumer-groups/' |
| @@ -0,0 +1,109 @@ | |||
| metadata: | |||
Comment on lines
+14
to
+16
| schema: | ||
| api: konnect/ai-gateway | ||
| path: /schemas/AIGatewayProvider |
| @@ -63,12 +63,16 @@ export default ({ command, mode }) => { | |||
| server: { | |||
| cors: { origin: 'http://localhost:8888' }, | |||
| proxy: { | |||
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.
Description
Resolves #5246 #4862
Bootstrap new entities and add support for setting them up with deck, admin-api and konnect-api. Note: the urls might change so we probably need to update them.
I added a hack - the one that says hack: to make ai gateway ...- so that the schemas render locally, it won't work in preview apps.
Note: we need to remove that commit before we release it and update
app/_data/konnect_oas_data.jsonandapp/_api/konnect/ai-gateway/_index.mdwith the right info after we upload the API spec to konnect. See this commit.This also adds a dummy OAS spec, we need to sync the final version once it's ready.
Preview Links
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/model/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/policy/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/consumer/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/consumer-group/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/provider/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/mcp-server/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/ai-gateway/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/agent/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/vault/
https://deploy-preview-5263--kongdeveloper.netlify.app/ai-gateway/entities/consumer-credential/
Checklist
descriptionentry in frontmatter.