Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/styles/base/Dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,8 @@ validators
Valkey
vararg
vc
vercel
Vercel
viewport
viewports
vLLM
Expand Down
22 changes: 22 additions & 0 deletions app/_data/plugins/ai-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions app/_data/schemas/frontmatter/tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
"upgrade",
"validation",
"vault",
"vercel",
"versioning",
"vertex-ai",
"vllm",
Expand Down
95 changes: 95 additions & 0 deletions app/_how-tos/ai-gateway/set-up-ai-proxy-advanced-with-vercel.md
Original file line number Diff line number Diff line change
@@ -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'

Comment thread
jbaross marked this conversation as resolved.
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 %}
94 changes: 94 additions & 0 deletions app/_how-tos/ai-gateway/set-up-ai-proxy-with-vercel.md
Original file line number Diff line number Diff line change
@@ -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'

Comment thread
jbaross marked this conversation as resolved.
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 %}
13 changes: 13 additions & 0 deletions app/_includes/prereqs/vercel.md
Original file line number Diff line number Diff line change
@@ -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'
```
34 changes: 34 additions & 0 deletions app/_kong_plugins/ai-proxy/examples/vercel-chat-route.yaml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 8 additions & 1 deletion app/_landing_pages/ai-gateway/ai-providers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
89 changes: 89 additions & 0 deletions app/ai-gateway/ai-providers/vercel.md
Original file line number Diff line number Diff line change
@@ -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'
Comment thread
jbaross marked this conversation as resolved.

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 %}
Loading
Loading