diff --git a/.github/styles/base/Dictionary.txt b/.github/styles/base/Dictionary.txt index 4656efd372..61da280d22 100644 --- a/.github/styles/base/Dictionary.txt +++ b/.github/styles/base/Dictionary.txt @@ -1031,6 +1031,8 @@ validators Valkey vararg vc +vercel +Vercel viewport viewports vLLM diff --git a/app/_data/plugins/ai-proxy.yaml b/app/_data/plugins/ai-proxy.yaml index a5c9a3a88c..89e06f16c8 100644 --- a/app/_data/plugins/ai-proxy.yaml +++ b/app/_data/plugins/ai-proxy.yaml @@ -941,6 +941,28 @@ providers: provider_specific: [] statistics_logging: [] + - name: 'Vercel' + url_patterns: + - 'https://ai-gateway.vercel.sh' + min_version: '2.0.0' + chat: + supported: true + streaming: true + upstream_path: '`/v1/chat/completions`' + route_type: 'llm/v1/chat' + model_example: 'openai/gpt-5.5' + min_version: '2.0.0' + embeddings: + supported: false + image: + generations: + supported: false + edits: + supported: false + limitations: + provider_specific: [] + statistics_logging: [] + parameters: provider: 'config.model.provider' route_type: 'config.route_type' diff --git a/app/_data/schemas/frontmatter/tags.json b/app/_data/schemas/frontmatter/tags.json index 2a2f02c525..a780078092 100644 --- a/app/_data/schemas/frontmatter/tags.json +++ b/app/_data/schemas/frontmatter/tags.json @@ -215,6 +215,7 @@ "upgrade", "validation", "vault", + "vercel", "versioning", "vertex-ai", "vllm", diff --git a/app/_how-tos/ai-gateway/set-up-ai-proxy-advanced-with-vercel.md b/app/_how-tos/ai-gateway/set-up-ai-proxy-advanced-with-vercel.md new file mode 100644 index 0000000000..fce6ff372c --- /dev/null +++ b/app/_how-tos/ai-gateway/set-up-ai-proxy-advanced-with-vercel.md @@ -0,0 +1,95 @@ +--- +title: Set up AI Proxy Advanced with Vercel in {{site.base_gateway}} +permalink: /how-to/set-up-ai-proxy-advanced-with-vercel/ +content_type: how_to +related_resources: + - text: "{{site.ai_gateway}}" + url: /ai-gateway/ + - text: AI Proxy Advanced + url: /plugins/ai-proxy-advanced/ + +description: Configure the AI Proxy Advanced plugin to create a chat route using Vercel. + +products: + - gateway + - ai-gateway + +works_on: + - on-prem + - konnect + +min_version: + gateway: '2.0.0' + +plugins: + - ai-proxy-advanced + +entities: + - service + - route + - plugin + +tags: + - ai + - openai + - vercel + +tldr: + q: How do I use the AI Proxy Advanced plugin with Vercel? + a: Create a Gateway Service and a Route, then enable the AI Proxy Advanced plugin and configure it with the OpenAI provider, a Vercel model, and your Vercel API key. + +tools: + - deck + +prereqs: + inline: + - title: Vercel + include_content: prereqs/vercel + icon_url: /assets/icons/vercel.svg + entities: + services: + - example-service + routes: + - example-route + +cleanup: + inline: + - title: Clean up Konnect environment + include_content: cleanup/platform/konnect + icon_url: /assets/icons/gateway.svg + - title: Destroy the {{site.base_gateway}} container + include_content: cleanup/products/gateway + icon_url: /assets/icons/gateway.svg +--- + +## Configure the plugin + +To set up AI Proxy Advanced with Vercel, use the `vercel` provider, specify the [model](https://vercel.com/ai-gateway/models) and set the appropriate authentication header and upstream URL. + +In this example, we'll use the `openai/gpt-5.5` model: + +{% entity_examples %} +entities: + plugins: + - name: ai-proxy-advanced + config: + targets: + - route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer ${api_key} + model: + provider: vercel + name: openai/gpt-5.5 + options: + upstream_url: https://ai-gateway.vercel.sh/v1/chat/completions + max_tokens: 512 + temperature: 1.0 +variables: + api_key: + value: $VERCEL_API_KEY +{% endentity_examples %} + +## Validate + +{% include how-tos/steps/ai-proxy-validate.md %} \ No newline at end of file diff --git a/app/_how-tos/ai-gateway/set-up-ai-proxy-with-vercel.md b/app/_how-tos/ai-gateway/set-up-ai-proxy-with-vercel.md new file mode 100644 index 0000000000..4dabd49b86 --- /dev/null +++ b/app/_how-tos/ai-gateway/set-up-ai-proxy-with-vercel.md @@ -0,0 +1,94 @@ +--- +title: Set up AI Proxy with Vercel in {{site.base_gateway}} +permalink: /how-to/set-up-ai-proxy-with-vercel/ +content_type: how_to +related_resources: + - text: "{{site.ai_gateway}}" + url: /ai-gateway/ + - text: AI Proxy + url: /plugins/ai-proxy/ + +description: Configure the AI Proxy plugin to create a chat route using Vercel. + +products: + - gateway + - ai-gateway + +works_on: + - on-prem + - konnect + +min_version: + gateway: '2.0.0' + +plugins: + - ai-proxy + +entities: + - service + - route + - plugin + +tags: + - ai + - openai + - vercel + +tldr: + q: How do I use the AI Proxy plugin with Vercel? + a: Create a Gateway Service and a Route, then enable the AI Proxy plugin and configure it with the OpenAI provider, a Vercel model, and your Vercel API key. + +tools: + - deck + +prereqs: + inline: + - title: Vercel + include_content: prereqs/vercel + icon_url: /assets/icons/vercel.svg + entities: + services: + - example-service + routes: + - example-route + +cleanup: + inline: + - title: Clean up Konnect environment + include_content: cleanup/platform/konnect + icon_url: /assets/icons/gateway.svg + - title: Destroy the {{site.base_gateway}} container + include_content: cleanup/products/gateway + icon_url: /assets/icons/gateway.svg +--- + +## Configure the plugin + +To set up AI Proxy with Vercel, use the `vercel` provider, specify the [model](https://vercel.com/ai-gateway/models) and set the appropriate authentication header and upstream URL. + +In this example, we'll use the `anthropic/claude-opus-4.6` model: + +{% entity_examples %} +entities: + plugins: + - name: ai-proxy + config: + route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer ${api_key} + model: + provider: vercel + name: anthropic/claude-opus-4.6 + options: + upstream_url: https://ai-gateway.vercel.sh/v1/chat/completions + max_tokens: 512 + temperature: 1.0 +variables: + api_key: + value: $VERCEL_API_KEY +{% endentity_examples %} + +## Validate + +{% include how-tos/steps/ai-proxy-validate.md %} \ No newline at end of file diff --git a/app/_includes/prereqs/vercel.md b/app/_includes/prereqs/vercel.md new file mode 100644 index 0000000000..69b728f34d --- /dev/null +++ b/app/_includes/prereqs/vercel.md @@ -0,0 +1,13 @@ +This tutorial requires a {{ site.vercel}} API key. + +1. Create a [{{ site.vercel }}](https://vercel.com/) account. +1. Click **{{ site.ai_gateway }}** +1. Click **API keys**. +1. Click **Create API key**. +1. In the **Name** field, enter `Kong`. +1. Click **Create API key**. +1. Click **Copy**. +1. Export the key to your environment: + ```sh + export DECK_VERCEL_API_KEY='YOUR VERCEL API KEY' + ``` \ No newline at end of file diff --git a/app/_kong_plugins/ai-proxy/examples/vercel-chat-route.yaml b/app/_kong_plugins/ai-proxy/examples/vercel-chat-route.yaml new file mode 100644 index 0000000000..e72b4cbe63 --- /dev/null +++ b/app/_kong_plugins/ai-proxy/examples/vercel-chat-route.yaml @@ -0,0 +1,34 @@ + +title: 'Chat route with Vercel' +description: 'Configure a chat route using the Vercel AI Gateway.' + +weight: 900 +min_version: + gateway: '3.14' +requirements: +- Vercel account + +config: + route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer ${key} + model: + provider: vercel + name: openai/gpt-5.5 + options: + upstream_url: https://ai-gateway.vercel.sh/v1/chat/completions + max_tokens: 512 + temperature: 1.0 + +variables: + key: + value: $VERCEL_API_KEY + description: The API key to use to connect to Vercel. + +tools: + - deck + - admin-api + - konnect-api + - kic + - terraform diff --git a/app/_landing_pages/ai-gateway/ai-providers.yaml b/app/_landing_pages/ai-gateway/ai-providers.yaml index 87b3514db2..b485256517 100644 --- a/app/_landing_pages/ai-gateway/ai-providers.yaml +++ b/app/_landing_pages/ai-gateway/ai-providers.yaml @@ -66,9 +66,16 @@ rows: - type: icon_card config: title: Vertex AI - icon: /assets/icons/Vertex.svg + icon: /assets/icons/vertex.svg cta: url: /ai-gateway/ai-providers/vertex/ + - blocks: + - type: icon_card + config: + title: Vercel + icon: /assets/icons/vercel.svg + cta: + url: /ai-gateway/ai-providers/vercel/ - blocks: - type: icon_card config: diff --git a/app/ai-gateway/ai-providers/vercel.md b/app/ai-gateway/ai-providers/vercel.md new file mode 100644 index 0000000000..f0bcd6b458 --- /dev/null +++ b/app/ai-gateway/ai-providers/vercel.md @@ -0,0 +1,89 @@ +--- +title: "Vercel provider" +layout: reference +content_type: reference +description: Reference for supported capabilities for Vercel provider +breadcrumbs: + - /ai-gateway/ + - /ai-gateway/ai-providers/ + +permalink: /ai-gateway/ai-providers/vercel/ + +works_on: + - on-prem + - konnect + +products: + - gateway + - ai-gateway + +tools: + - admin-api + - konnect-api + - deck + - kic + - terraform + +tags: + - ai + +plugins: + - ai-proxy-advanced + - ai-proxy + +min_version: + gateway: '2.0.0' + +related_resources: + - text: "{{site.ai_gateway}}" + url: /ai-gateway/ + - text: "{{site.ai_gateway}} plugins" + url: /plugins/?category=ai + - text: AI Providers + url: /ai-gateway/ai-providers/ + +how_to_list: + config: + products: + - ai-gateway + tags: + - vercel + description: true + view_more: false +--- + + +{% include plugins/ai-proxy/providers/providers.md providers=site.data.plugins.ai-proxy provider_name="Vercel" %} + +## Configure {{ provider.name }} with AI Proxy + +To use {{ provider.name }} with {{site.ai_gateway}}, configure the [AI Proxy](/plugins/ai-proxy/) or [AI Proxy Advanced](/plugins/ai-proxy-advanced/) plugin. + +Note that, {{ site.vercel }} hosts [models](https://vercel.com/ai-gateway/models) from other providers so in this example we use `openai/gpt-5.5`. + +Here's a minimal configuration for chat completions: + +{% entity_example %} +type: plugin +data: + name: ai-proxy + config: + route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer ${key} + model: + provider: vercel + name: openai/gpt-5.5 + +variables: + key: + value: "$VERCEL_API_KEY" +{% endentity_example %} + +{:.success} +> For more configuration options and examples, see: +> - [AI Proxy examples](/plugins/ai-proxy/examples/) +> - [AI Proxy Advanced examples](/plugins/ai-proxy-advanced/examples/) + +{% include plugins/ai-proxy/providers/how-tos.md %} \ No newline at end of file diff --git a/app/assets/icons/vercel.svg b/app/assets/icons/vercel.svg new file mode 100644 index 0000000000..72948d01a7 --- /dev/null +++ b/app/assets/icons/vercel.svg @@ -0,0 +1,3 @@ + + + diff --git a/jekyll.yml b/jekyll.yml index a8cedcfaaa..cd5fee4c0d 100644 --- a/jekyll.yml +++ b/jekyll.yml @@ -141,6 +141,8 @@ konnect_catalog: Catalog metering_and_billing: Metering & Billing observability: Observability dev_portal: Dev Portal +# 3rd party product names +vercel: Vercel repos: developer: https://github.com/Kong/developer.konghq.com