From 4f7f074de045979b968debd6cb942225ff0a8ffb Mon Sep 17 00:00:00 2001 From: joshualipman123 Date: Mon, 25 Aug 2025 16:21:53 -0700 Subject: [PATCH 1/3] vercel ai gateway docs --- docs/providers/vercel-ai-gateway.md | 56 +++++++++++++++++++++++++++++ sidebars.ts | 7 ++-- 2 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 docs/providers/vercel-ai-gateway.md diff --git a/docs/providers/vercel-ai-gateway.md b/docs/providers/vercel-ai-gateway.md new file mode 100644 index 00000000..a75bd237 --- /dev/null +++ b/docs/providers/vercel-ai-gateway.md @@ -0,0 +1,56 @@ +--- +description: Configure the Vercel AI Gateway in Roo Code to robustly access 100+ language models from various providers through a centralized interface. +keywords: + - roo code + - vercel ai gateway + - ai provider + - language models + - api configuration + - model selection + - prompt caching + - usage tracking + - byok +sidebar_label: Vercel AI Gateway +image: /img/social-share.jpg +--- + +# Using Vercel AI Gateway With Roo Code + +The AI Gateway provides a unified API to access hundreds of models through a single endpoint. It gives you the ability to set budgets, monitor usage, load-balance requests, and manage fallbacks. + +Useful links: +- Team dashboard: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai +- Models catalog: https://vercel.com/ai-gateway/models +- Docs: https://vercel.com/docs/ai-gateway + +--- + +## Getting an API Key + +1. **Sign Up/Sign In:** Go to the [Vercel Website](https://vercel.com/) and sign in Sign in. +2. **Get an API Key:** Go to the [API Key page](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys&title=AI+Gateway+API+Key) in the AI Gateway tab. Create a new key. +3. **Copy the Key:** Copy the API key. + +--- + +## Supported Models + +the Vercel AI Gateway supports a large and growing number of models. Roo Code automatically fetches the list of available models. Refer to the [Vercel AI Gateway Models page](https://vercel.com/ai-gateway/models) for the complete and up-to-date list. + +--- + +## Configuration in Roo Code + +1. **Open Roo Code Settings:** Click the gear icon () in the Roo Code panel. +2. **Select Provider:** Choose "Vercel AI Gateway" from the "API Provider" dropdown. +3. **Enter API Key:** Paste your Vercel AI Gateway API key into the "Vercel AI Gateway API Key" field. +4. **Select Model:** Choose your desired model from the "Model" dropdown. + +--- + +## Tips and Notes + +* **Model Selection:** OpenRouter offers a wide range of models. Experiment to find the best one for your needs. +* **Pricing:** The Vercel AI Gateway charges based on the underlying model's pricing. See the [Vercel AI Gateway Models page](https://vercel.com/ai-gateway/models) for details. +* **Bring Your Own Key (BYOK):** The Vercel AI Gateway has **no markup** if you decide to use your own key for the underlying service. +* **More info:** Vercel does not add rate limits. Upstream providers may. New accounts receive $5 credits every 30 days until the first payment. diff --git a/sidebars.ts b/sidebars.ts index 963c4f46..5ae89b85 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1,4 +1,4 @@ -import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; +import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; import tutorialVideos from './docs/tutorial-videos.json'; // Helper function to truncate long titles @@ -181,6 +181,7 @@ const sidebars: SidebarsConfig = { 'providers/roo-code-cloud', 'providers/sambanova', 'providers/unbound', + 'providers/vercel-ai-gateway', 'providers/vertex', 'providers/vscode-lm', 'providers/xai', @@ -296,7 +297,7 @@ const sidebars: SidebarsConfig = { { type: 'doc', id: 'update-notes/v3.21.5', label: '3.21.5' }, { type: 'doc', id: 'update-notes/v3.21.4', label: '3.21.4' }, { type: 'doc', id: 'update-notes/v3.21.3', label: '3.21.3' }, - { type: 'doc', id: 'update-notes/v3.21.2', label: '3.21.2' }, + { type: 'doc', id: 'update-notes/v3.21.2', label: '3.21.2' }, { type: 'doc', id: 'update-notes/v3.21.1', label: '3.21.1' }, { type: 'doc', id: 'update-notes/v3.21.0', label: '3.21.0' }, ], @@ -610,7 +611,7 @@ const sidebars: SidebarsConfig = { { type: 'doc', id: 'update-notes/v2.2.44', label: '2.2.44' }, { type: 'doc', id: 'update-notes/v2.2.45', label: '2.2.45' }, { type: 'doc', id: 'update-notes/v2.2.46', label: '2.2.46' }, - ], + ], }, { type: 'category', From dfbe7ceed4b91474000ccdc7a8c569002b583307 Mon Sep 17 00:00:00 2001 From: joshualipman123 Date: Mon, 25 Aug 2025 16:24:25 -0700 Subject: [PATCH 2/3] fix formatting --- sidebars.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sidebars.ts b/sidebars.ts index 5ae89b85..315ab010 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1,4 +1,4 @@ -import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; +import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; import tutorialVideos from './docs/tutorial-videos.json'; // Helper function to truncate long titles @@ -297,7 +297,7 @@ const sidebars: SidebarsConfig = { { type: 'doc', id: 'update-notes/v3.21.5', label: '3.21.5' }, { type: 'doc', id: 'update-notes/v3.21.4', label: '3.21.4' }, { type: 'doc', id: 'update-notes/v3.21.3', label: '3.21.3' }, - { type: 'doc', id: 'update-notes/v3.21.2', label: '3.21.2' }, + { type: 'doc', id: 'update-notes/v3.21.2', label: '3.21.2' }, { type: 'doc', id: 'update-notes/v3.21.1', label: '3.21.1' }, { type: 'doc', id: 'update-notes/v3.21.0', label: '3.21.0' }, ], @@ -611,7 +611,7 @@ const sidebars: SidebarsConfig = { { type: 'doc', id: 'update-notes/v2.2.44', label: '2.2.44' }, { type: 'doc', id: 'update-notes/v2.2.45', label: '2.2.45' }, { type: 'doc', id: 'update-notes/v2.2.46', label: '2.2.46' }, - ], + ], }, { type: 'category', From 4d9a4b39f4d490c96bd1e0b55196fec1d93e340e Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Tue, 26 Aug 2025 16:59:16 -0600 Subject: [PATCH 3/3] Update Vercel AI Gateway documentation - Remove incorrect BYOK claim (not available in Roo Code) - Add default model information (anthropic/claude-sonnet-4) - Document prompt caching feature for Claude and GPT models - Add model capabilities section (vision and tool support) - Improve pricing clarity with model dropdown tip - Add security and troubleshooting notes - Document default temperature setting (0.7) - Note that only language models are displayed - Include API endpoint for technical reference --- docs/providers/vercel-ai-gateway.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/providers/vercel-ai-gateway.md b/docs/providers/vercel-ai-gateway.md index a75bd237..91273101 100644 --- a/docs/providers/vercel-ai-gateway.md +++ b/docs/providers/vercel-ai-gateway.md @@ -27,7 +27,9 @@ Useful links: ## Getting an API Key -1. **Sign Up/Sign In:** Go to the [Vercel Website](https://vercel.com/) and sign in Sign in. +An API key is required for authentication. + +1. **Sign Up/Sign In:** Go to the [Vercel Website](https://vercel.com/) and sign in. 2. **Get an API Key:** Go to the [API Key page](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys&title=AI+Gateway+API+Key) in the AI Gateway tab. Create a new key. 3. **Copy the Key:** Copy the API key. @@ -35,7 +37,18 @@ Useful links: ## Supported Models -the Vercel AI Gateway supports a large and growing number of models. Roo Code automatically fetches the list of available models. Refer to the [Vercel AI Gateway Models page](https://vercel.com/ai-gateway/models) for the complete and up-to-date list. +The Vercel AI Gateway supports a large and growing number of models. Roo Code automatically fetches the list of available models from the `https://ai-gateway.vercel.sh/v1/models` endpoint. Only language models are shown. + +The default model is `anthropic/claude-sonnet-4` if no model is selected. + +Refer to the [Vercel AI Gateway Models page](https://vercel.com/ai-gateway/models) for the complete and up-to-date list. + +### Model Capabilities + +- **Vision Support**: Many models support image inputs. +- **Tool/Computer Use**: Select models support function calling and computer use. + +Check the model description in the dropdown for specific capabilities. --- @@ -48,9 +61,15 @@ the Vercel AI Gateway supports a large and growing number of models. Roo Code a --- +## Prompt Caching +Vercel AI Gateway supports automatic prompt caching for select models including Anthropic Claude and OpenAI GPT models. This reduces costs by caching frequently used prompts. + +--- + ## Tips and Notes -* **Model Selection:** OpenRouter offers a wide range of models. Experiment to find the best one for your needs. -* **Pricing:** The Vercel AI Gateway charges based on the underlying model's pricing. See the [Vercel AI Gateway Models page](https://vercel.com/ai-gateway/models) for details. +* **Model Selection:** The Vercel AI Gateway offers a wide range of models. Experiment to find the best one for your needs. +* **Pricing:** The Vercel AI Gateway charges based on the underlying model's pricing, including costs for cached prompts. See the [Vercel AI Gateway Models page](https://vercel.com/ai-gateway/models) for details. +* **Temperature:** The default temperature is `0.7` and is configurable per model. * **Bring Your Own Key (BYOK):** The Vercel AI Gateway has **no markup** if you decide to use your own key for the underlying service. * **More info:** Vercel does not add rate limits. Upstream providers may. New accounts receive $5 credits every 30 days until the first payment.