diff --git a/src/api/providers/vercel-ai-gateway.ts b/src/api/providers/vercel-ai-gateway.ts
index 0b14d43c63..093fffe260 100644
--- a/src/api/providers/vercel-ai-gateway.ts
+++ b/src/api/providers/vercel-ai-gateway.ts
@@ -23,6 +23,7 @@ interface VercelAiGatewayUsage extends OpenAI.CompletionUsage {
prompt_tokens_details?: {
cached_tokens?: number
}
+ cost?: number
}
export class VercelAiGatewayHandler extends RouterProvider implements SingleCompletionHandler {
@@ -83,6 +84,7 @@ export class VercelAiGatewayHandler extends RouterProvider implements SingleComp
outputTokens: usage.completion_tokens || 0,
cacheWriteTokens: usage.cache_creation_input_tokens || undefined,
cacheReadTokens: usage.prompt_tokens_details?.cached_tokens || undefined,
+ totalCost: usage.cost ?? 0,
}
}
}
diff --git a/webview-ui/src/components/settings/providers/VercelAiGateway.tsx b/webview-ui/src/components/settings/providers/VercelAiGateway.tsx
index edbcc83189..8050469efc 100644
--- a/webview-ui/src/components/settings/providers/VercelAiGateway.tsx
+++ b/webview-ui/src/components/settings/providers/VercelAiGateway.tsx
@@ -7,6 +7,7 @@ import type { OrganizationAllowList } from "@roo/cloud"
import type { RouterModels } from "@roo/api"
import { useAppTranslation } from "@src/i18n/TranslationContext"
+import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink"
import { inputEventTransform } from "../transforms"
import { ModelPicker } from "../ModelPicker"
@@ -52,6 +53,14 @@ export const VercelAiGateway = ({
{t("settings:providers.apiKeyStorageNotice")}
+ {!apiConfiguration?.vercelAiGatewayApiKey && (
+
+ {t("settings:providers.getVercelAiGatewayApiKey")}
+
+ )}
{{serviceName}}. If you're unsure which model to choose, Roo Code works best with {{defaultModelId}}. You can also try searching \"free\" for no-cost options currently available.",
+ "automaticFetch": "Note: Free tier users will see $0 costs as these requests are provided at no charge by Vercel AI Gateway.",
"label": "Model",
"searchPlaceholder": "Search",
"noMatchFound": "No match found",
diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json
index 6eb3b5c3eb..da5a5c367d 100644
--- a/webview-ui/src/i18n/locales/es/settings.json
+++ b/webview-ui/src/i18n/locales/es/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "Clave API de OpenRouter",
"getOpenRouterApiKey": "Obtener clave API de OpenRouter",
"vercelAiGatewayApiKey": "Clave API de Vercel AI Gateway",
+ "getVercelAiGatewayApiKey": "Obtener clave API de Vercel AI Gateway",
"apiKeyStorageNotice": "Las claves API se almacenan de forma segura en el Almacenamiento Secreto de VSCode",
"glamaApiKey": "Clave API de Glama",
"getGlamaApiKey": "Obtener clave API de Glama",
diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json
index 50124518d1..6c73a7adfd 100644
--- a/webview-ui/src/i18n/locales/fr/settings.json
+++ b/webview-ui/src/i18n/locales/fr/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "Clé API OpenRouter",
"getOpenRouterApiKey": "Obtenir la clé API OpenRouter",
"vercelAiGatewayApiKey": "Clé API Vercel AI Gateway",
+ "getVercelAiGatewayApiKey": "Obtenir la clé API Vercel AI Gateway",
"apiKeyStorageNotice": "Les clés API sont stockées en toute sécurité dans le stockage sécurisé de VSCode",
"glamaApiKey": "Clé API Glama",
"getGlamaApiKey": "Obtenir la clé API Glama",
diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json
index 66ec621813..e0cf5574d0 100644
--- a/webview-ui/src/i18n/locales/it/settings.json
+++ b/webview-ui/src/i18n/locales/it/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "Chiave API OpenRouter",
"getOpenRouterApiKey": "Ottieni chiave API OpenRouter",
"vercelAiGatewayApiKey": "Chiave API Vercel AI Gateway",
+ "getVercelAiGatewayApiKey": "Ottieni chiave API Vercel AI Gateway",
"apiKeyStorageNotice": "Le chiavi API sono memorizzate in modo sicuro nell'Archivio Segreto di VSCode",
"glamaApiKey": "Chiave API Glama",
"getGlamaApiKey": "Ottieni chiave API Glama",
diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json
index 4e9b2848e2..76661ec091 100644
--- a/webview-ui/src/i18n/locales/ja/settings.json
+++ b/webview-ui/src/i18n/locales/ja/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "OpenRouter APIキー",
"getOpenRouterApiKey": "OpenRouter APIキーを取得",
"vercelAiGatewayApiKey": "Vercel AI Gateway APIキー",
+ "getVercelAiGatewayApiKey": "Vercel AI Gateway APIキーを取得",
"apiKeyStorageNotice": "APIキーはVSCodeのシークレットストレージに安全に保存されます",
"glamaApiKey": "Glama APIキー",
"getGlamaApiKey": "Glama APIキーを取得",
diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json
index 2837b2dec3..463cad8d26 100644
--- a/webview-ui/src/i18n/locales/ko/settings.json
+++ b/webview-ui/src/i18n/locales/ko/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "OpenRouter API 키",
"getOpenRouterApiKey": "OpenRouter API 키 받기",
"vercelAiGatewayApiKey": "Vercel AI Gateway API 키",
+ "getVercelAiGatewayApiKey": "Vercel AI Gateway API 키 받기",
"apiKeyStorageNotice": "API 키는 VSCode의 보안 저장소에 안전하게 저장됩니다",
"glamaApiKey": "Glama API 키",
"getGlamaApiKey": "Glama API 키 받기",
diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json
index 197c7af922..04655ba604 100644
--- a/webview-ui/src/i18n/locales/pt-BR/settings.json
+++ b/webview-ui/src/i18n/locales/pt-BR/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "Chave de API OpenRouter",
"getOpenRouterApiKey": "Obter chave de API OpenRouter",
"vercelAiGatewayApiKey": "Chave API do Vercel AI Gateway",
+ "getVercelAiGatewayApiKey": "Obter chave API do Vercel AI Gateway",
"apiKeyStorageNotice": "As chaves de API são armazenadas com segurança no Armazenamento Secreto do VSCode",
"glamaApiKey": "Chave de API Glama",
"getGlamaApiKey": "Obter chave de API Glama",
diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json
index a88dcfbc69..c3b351b69b 100644
--- a/webview-ui/src/i18n/locales/ru/settings.json
+++ b/webview-ui/src/i18n/locales/ru/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "OpenRouter API-ключ",
"getOpenRouterApiKey": "Получить OpenRouter API-ключ",
"vercelAiGatewayApiKey": "Ключ API Vercel AI Gateway",
+ "getVercelAiGatewayApiKey": "Получить ключ API Vercel AI Gateway",
"apiKeyStorageNotice": "API-ключи хранятся безопасно в Secret Storage VSCode",
"glamaApiKey": "Glama API-ключ",
"getGlamaApiKey": "Получить Glama API-ключ",
diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json
index 94b3db1885..cb8dde46af 100644
--- a/webview-ui/src/i18n/locales/zh-CN/settings.json
+++ b/webview-ui/src/i18n/locales/zh-CN/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "OpenRouter API 密钥",
"getOpenRouterApiKey": "获取 OpenRouter API 密钥",
"vercelAiGatewayApiKey": "Vercel AI Gateway API 密钥",
+ "getVercelAiGatewayApiKey": "获取 Vercel AI Gateway API 密钥",
"apiKeyStorageNotice": "API 密钥安全存储在 VSCode 的密钥存储中",
"glamaApiKey": "Glama API 密钥",
"getGlamaApiKey": "获取 Glama API 密钥",
diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json
index 31359291ce..adf5d5fd95 100644
--- a/webview-ui/src/i18n/locales/zh-TW/settings.json
+++ b/webview-ui/src/i18n/locales/zh-TW/settings.json
@@ -234,6 +234,7 @@
"openRouterApiKey": "OpenRouter API 金鑰",
"getOpenRouterApiKey": "取得 OpenRouter API 金鑰",
"vercelAiGatewayApiKey": "Vercel AI Gateway API 金鑰",
+ "getVercelAiGatewayApiKey": "取得 Vercel AI Gateway API 金鑰",
"apiKeyStorageNotice": "API 金鑰安全儲存於 VSCode 金鑰儲存中",
"glamaApiKey": "Glama API 金鑰",
"getGlamaApiKey": "取得 Glama API 金鑰",