From 65eb738c900dce17cdd2d5b6583d9a2f1adb51dc Mon Sep 17 00:00:00 2001 From: Timo Lins Date: Tue, 13 Jan 2026 15:22:34 +0100 Subject: [PATCH] Rename to `vercel-ai-gateway` for clarity --- packages/ai/scripts/generate-models.ts | 2 +- packages/ai/src/models.generated.ts | 250 +++++++++--------- packages/ai/src/stream.ts | 2 +- packages/ai/src/types.ts | 2 +- packages/ai/test/stream.test.ts | 2 +- packages/coding-agent/README.md | 4 +- .../coding-agent/src/core/model-resolver.ts | 2 +- .../coding-agent/test/model-resolver.test.ts | 6 +- .../web-ui/src/components/ProviderKeyInput.ts | 2 +- 9 files changed, 136 insertions(+), 136 deletions(-) diff --git a/packages/ai/scripts/generate-models.ts b/packages/ai/scripts/generate-models.ts index ce5c2cf1..7548ff17 100644 --- a/packages/ai/scripts/generate-models.ts +++ b/packages/ai/scripts/generate-models.ts @@ -150,7 +150,7 @@ async function fetchAiGatewayModels(): Promise[]> { name: model.name || model.id, api: "anthropic-messages", baseUrl: AI_GATEWAY_BASE_URL, - provider: "ai-gateway", + provider: "vercel-ai-gateway", reasoning: tags.includes("reasoning"), input, cost: { diff --git a/packages/ai/src/models.generated.ts b/packages/ai/src/models.generated.ts index d8730f6e..e3601c37 100644 --- a/packages/ai/src/models.generated.ts +++ b/packages/ai/src/models.generated.ts @@ -4,12 +4,12 @@ import type { Model } from "./types.js"; export const MODELS = { - "ai-gateway": { + "vercel-ai-gateway": { "alibaba/qwen-3-14b": { id: "alibaba/qwen-3-14b", name: "Qwen3-14B", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -26,7 +26,7 @@ export const MODELS = { id: "alibaba/qwen-3-235b", name: "Qwen3 235B A22b Instruct 2507", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -43,7 +43,7 @@ export const MODELS = { id: "alibaba/qwen-3-30b", name: "Qwen3-30B-A3B", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -60,7 +60,7 @@ export const MODELS = { id: "alibaba/qwen-3-32b", name: "Qwen 3.32B", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -77,7 +77,7 @@ export const MODELS = { id: "alibaba/qwen3-235b-a22b-thinking", name: "Qwen3 235B A22B Thinking 2507", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -94,7 +94,7 @@ export const MODELS = { id: "alibaba/qwen3-coder", name: "Qwen3 Coder 480B A35B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -111,7 +111,7 @@ export const MODELS = { id: "alibaba/qwen3-coder-30b-a3b", name: "Qwen 3 Coder 30B A3B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -128,7 +128,7 @@ export const MODELS = { id: "alibaba/qwen3-coder-plus", name: "Qwen3 Coder Plus", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -145,7 +145,7 @@ export const MODELS = { id: "alibaba/qwen3-max", name: "Qwen3 Max", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -162,7 +162,7 @@ export const MODELS = { id: "alibaba/qwen3-max-preview", name: "Qwen3 Max Preview", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -179,7 +179,7 @@ export const MODELS = { id: "anthropic/claude-3-haiku", name: "Claude 3 Haiku", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -196,7 +196,7 @@ export const MODELS = { id: "anthropic/claude-3-opus", name: "Claude 3 Opus", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -213,7 +213,7 @@ export const MODELS = { id: "anthropic/claude-3.5-haiku", name: "Claude 3.5 Haiku", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -230,7 +230,7 @@ export const MODELS = { id: "anthropic/claude-3.5-sonnet", name: "Claude 3.5 Sonnet", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -247,7 +247,7 @@ export const MODELS = { id: "anthropic/claude-3.5-sonnet-20240620", name: "Claude 3.5 Sonnet (2024-06-20)", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -264,7 +264,7 @@ export const MODELS = { id: "anthropic/claude-3.7-sonnet", name: "Claude 3.7 Sonnet", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -281,7 +281,7 @@ export const MODELS = { id: "anthropic/claude-haiku-4.5", name: "Claude Haiku 4.5", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -298,7 +298,7 @@ export const MODELS = { id: "anthropic/claude-opus-4", name: "Claude Opus 4", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -315,7 +315,7 @@ export const MODELS = { id: "anthropic/claude-opus-4.1", name: "Claude Opus 4.1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -332,7 +332,7 @@ export const MODELS = { id: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -349,7 +349,7 @@ export const MODELS = { id: "anthropic/claude-sonnet-4", name: "Claude Sonnet 4", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -366,7 +366,7 @@ export const MODELS = { id: "anthropic/claude-sonnet-4.5", name: "Claude Sonnet 4.5", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -383,7 +383,7 @@ export const MODELS = { id: "bytedance/seed-1.6", name: "Seed 1.6", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -400,7 +400,7 @@ export const MODELS = { id: "cohere/command-a", name: "Command A", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -417,7 +417,7 @@ export const MODELS = { id: "deepseek/deepseek-v3", name: "DeepSeek V3 0324", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -434,7 +434,7 @@ export const MODELS = { id: "deepseek/deepseek-v3.1", name: "DeepSeek-V3.1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -451,7 +451,7 @@ export const MODELS = { id: "deepseek/deepseek-v3.1-terminus", name: "DeepSeek V3.1 Terminus", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -468,7 +468,7 @@ export const MODELS = { id: "deepseek/deepseek-v3.2-exp", name: "DeepSeek V3.2 Exp", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -485,7 +485,7 @@ export const MODELS = { id: "deepseek/deepseek-v3.2-thinking", name: "DeepSeek V3.2 Thinking", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -502,7 +502,7 @@ export const MODELS = { id: "google/gemini-2.0-flash", name: "Gemini 2.0 Flash", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -519,7 +519,7 @@ export const MODELS = { id: "google/gemini-2.0-flash-lite", name: "Gemini 2.0 Flash Lite", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -536,7 +536,7 @@ export const MODELS = { id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -553,7 +553,7 @@ export const MODELS = { id: "google/gemini-2.5-flash-lite", name: "Gemini 2.5 Flash Lite", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -570,7 +570,7 @@ export const MODELS = { id: "google/gemini-2.5-flash-lite-preview-09-2025", name: "Gemini 2.5 Flash Lite Preview 09-2025", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -587,7 +587,7 @@ export const MODELS = { id: "google/gemini-2.5-flash-preview-09-2025", name: "Gemini 2.5 Flash Preview 09-2025", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -604,7 +604,7 @@ export const MODELS = { id: "google/gemini-2.5-pro", name: "Gemini 2.5 Pro", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -621,7 +621,7 @@ export const MODELS = { id: "google/gemini-3-flash", name: "Gemini 3 Flash", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -638,7 +638,7 @@ export const MODELS = { id: "google/gemini-3-pro-preview", name: "Gemini 3 Pro Preview", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -655,7 +655,7 @@ export const MODELS = { id: "inception/mercury-coder-small", name: "Mercury Coder Small Beta", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -672,7 +672,7 @@ export const MODELS = { id: "meituan/longcat-flash-chat", name: "LongCat Flash Chat", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -689,7 +689,7 @@ export const MODELS = { id: "meituan/longcat-flash-thinking", name: "LongCat Flash Thinking", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -706,7 +706,7 @@ export const MODELS = { id: "meta/llama-3.1-70b", name: "Llama 3.1 70B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -723,7 +723,7 @@ export const MODELS = { id: "meta/llama-3.1-8b", name: "Llama 3.1 8B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -740,7 +740,7 @@ export const MODELS = { id: "meta/llama-3.2-11b", name: "Llama 3.2 11B Vision Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -757,7 +757,7 @@ export const MODELS = { id: "meta/llama-3.2-90b", name: "Llama 3.2 90B Vision Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -774,7 +774,7 @@ export const MODELS = { id: "meta/llama-3.3-70b", name: "Llama 3.3 70B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -791,7 +791,7 @@ export const MODELS = { id: "meta/llama-4-maverick", name: "Llama 4 Maverick 17B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -808,7 +808,7 @@ export const MODELS = { id: "meta/llama-4-scout", name: "Llama 4 Scout 17B Instruct", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -825,7 +825,7 @@ export const MODELS = { id: "minimax/minimax-m2", name: "MiniMax M2", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -842,7 +842,7 @@ export const MODELS = { id: "minimax/minimax-m2.1", name: "MiniMax M2.1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -859,7 +859,7 @@ export const MODELS = { id: "minimax/minimax-m2.1-lightning", name: "MiniMax M2.1 Lightning", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -876,7 +876,7 @@ export const MODELS = { id: "mistral/codestral", name: "Mistral Codestral", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -893,7 +893,7 @@ export const MODELS = { id: "mistral/devstral-2", name: "Devstral 2", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -910,7 +910,7 @@ export const MODELS = { id: "mistral/devstral-small", name: "Devstral Small 1.1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -927,7 +927,7 @@ export const MODELS = { id: "mistral/devstral-small-2", name: "Devstral Small 2", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -944,7 +944,7 @@ export const MODELS = { id: "mistral/ministral-3b", name: "Ministral 3B", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -961,7 +961,7 @@ export const MODELS = { id: "mistral/ministral-8b", name: "Ministral 8B", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -978,7 +978,7 @@ export const MODELS = { id: "mistral/mistral-medium", name: "Mistral Medium 3.1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -995,7 +995,7 @@ export const MODELS = { id: "mistral/mistral-nemo", name: "Mistral Nemo", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1012,7 +1012,7 @@ export const MODELS = { id: "mistral/mistral-small", name: "Mistral Small", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1029,7 +1029,7 @@ export const MODELS = { id: "mistral/pixtral-12b", name: "Pixtral 12B 2409", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1046,7 +1046,7 @@ export const MODELS = { id: "mistral/pixtral-large", name: "Pixtral Large", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1063,7 +1063,7 @@ export const MODELS = { id: "moonshotai/kimi-k2", name: "Kimi K2", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1080,7 +1080,7 @@ export const MODELS = { id: "moonshotai/kimi-k2-thinking", name: "Kimi K2 Thinking", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1097,7 +1097,7 @@ export const MODELS = { id: "moonshotai/kimi-k2-thinking-turbo", name: "Kimi K2 Thinking Turbo", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1114,7 +1114,7 @@ export const MODELS = { id: "moonshotai/kimi-k2-turbo", name: "Kimi K2 Turbo", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1131,7 +1131,7 @@ export const MODELS = { id: "nvidia/nemotron-nano-12b-v2-vl", name: "Nvidia Nemotron Nano 12B V2 VL", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1148,7 +1148,7 @@ export const MODELS = { id: "nvidia/nemotron-nano-9b-v2", name: "Nvidia Nemotron Nano 9B V2", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1165,7 +1165,7 @@ export const MODELS = { id: "openai/codex-mini", name: "Codex Mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1182,7 +1182,7 @@ export const MODELS = { id: "openai/gpt-4-turbo", name: "GPT-4 Turbo", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1199,7 +1199,7 @@ export const MODELS = { id: "openai/gpt-4.1", name: "GPT-4.1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1216,7 +1216,7 @@ export const MODELS = { id: "openai/gpt-4.1-mini", name: "GPT-4.1 mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1233,7 +1233,7 @@ export const MODELS = { id: "openai/gpt-4.1-nano", name: "GPT-4.1 nano", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1250,7 +1250,7 @@ export const MODELS = { id: "openai/gpt-4o", name: "GPT-4o", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1267,7 +1267,7 @@ export const MODELS = { id: "openai/gpt-4o-mini", name: "GPT-4o mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1284,7 +1284,7 @@ export const MODELS = { id: "openai/gpt-5", name: "GPT-5", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1301,7 +1301,7 @@ export const MODELS = { id: "openai/gpt-5-chat", name: "GPT-5 Chat", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1318,7 +1318,7 @@ export const MODELS = { id: "openai/gpt-5-codex", name: "GPT-5-Codex", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1335,7 +1335,7 @@ export const MODELS = { id: "openai/gpt-5-mini", name: "GPT-5 mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1352,7 +1352,7 @@ export const MODELS = { id: "openai/gpt-5-nano", name: "GPT-5 nano", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1369,7 +1369,7 @@ export const MODELS = { id: "openai/gpt-5-pro", name: "GPT-5 pro", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1386,7 +1386,7 @@ export const MODELS = { id: "openai/gpt-5.1-codex", name: "GPT-5.1-Codex", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1403,7 +1403,7 @@ export const MODELS = { id: "openai/gpt-5.1-codex-max", name: "GPT 5.1 Codex Max", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1420,7 +1420,7 @@ export const MODELS = { id: "openai/gpt-5.1-codex-mini", name: "GPT-5.1 Codex mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1437,7 +1437,7 @@ export const MODELS = { id: "openai/gpt-5.1-instant", name: "GPT-5.1 Instant", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1454,7 +1454,7 @@ export const MODELS = { id: "openai/gpt-5.1-thinking", name: "GPT 5.1 Thinking", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1471,7 +1471,7 @@ export const MODELS = { id: "openai/gpt-5.2", name: "GPT-5.2", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1488,7 +1488,7 @@ export const MODELS = { id: "openai/gpt-5.2-chat", name: "GPT-5.2 Chat", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1505,7 +1505,7 @@ export const MODELS = { id: "openai/gpt-5.2-pro", name: "GPT 5.2 ", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1522,7 +1522,7 @@ export const MODELS = { id: "openai/gpt-oss-120b", name: "gpt-oss-120b", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1539,7 +1539,7 @@ export const MODELS = { id: "openai/gpt-oss-20b", name: "gpt-oss-20b", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1556,7 +1556,7 @@ export const MODELS = { id: "openai/gpt-oss-safeguard-20b", name: "gpt-oss-safeguard-20b", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1573,7 +1573,7 @@ export const MODELS = { id: "openai/o1", name: "o1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1590,7 +1590,7 @@ export const MODELS = { id: "openai/o3", name: "o3", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1607,7 +1607,7 @@ export const MODELS = { id: "openai/o3-deep-research", name: "o3-deep-research", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1624,7 +1624,7 @@ export const MODELS = { id: "openai/o3-mini", name: "o3-mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1641,7 +1641,7 @@ export const MODELS = { id: "openai/o3-pro", name: "o3 Pro", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1658,7 +1658,7 @@ export const MODELS = { id: "openai/o4-mini", name: "o4-mini", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1675,7 +1675,7 @@ export const MODELS = { id: "perplexity/sonar", name: "Sonar", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1692,7 +1692,7 @@ export const MODELS = { id: "perplexity/sonar-pro", name: "Sonar Pro", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1709,7 +1709,7 @@ export const MODELS = { id: "prime-intellect/intellect-3", name: "INTELLECT 3", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1726,7 +1726,7 @@ export const MODELS = { id: "stealth/sonoma-dusk-alpha", name: "Sonoma Dusk Alpha", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1743,7 +1743,7 @@ export const MODELS = { id: "stealth/sonoma-sky-alpha", name: "Sonoma Sky Alpha", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1760,7 +1760,7 @@ export const MODELS = { id: "vercel/v0-1.0-md", name: "v0-1.0-md", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1777,7 +1777,7 @@ export const MODELS = { id: "vercel/v0-1.5-md", name: "v0-1.5-md", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1794,7 +1794,7 @@ export const MODELS = { id: "xai/grok-2-vision", name: "Grok 2 Vision", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text", "image"], @@ -1811,7 +1811,7 @@ export const MODELS = { id: "xai/grok-3", name: "Grok 3 Beta", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1828,7 +1828,7 @@ export const MODELS = { id: "xai/grok-3-fast", name: "Grok 3 Fast Beta", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1845,7 +1845,7 @@ export const MODELS = { id: "xai/grok-3-mini", name: "Grok 3 Mini Beta", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1862,7 +1862,7 @@ export const MODELS = { id: "xai/grok-3-mini-fast", name: "Grok 3 Mini Fast Beta", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1879,7 +1879,7 @@ export const MODELS = { id: "xai/grok-4", name: "Grok 4", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -1896,7 +1896,7 @@ export const MODELS = { id: "xai/grok-4-fast-non-reasoning", name: "Grok 4 Fast Non-Reasoning", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1913,7 +1913,7 @@ export const MODELS = { id: "xai/grok-4-fast-reasoning", name: "Grok 4 Fast Reasoning", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1930,7 +1930,7 @@ export const MODELS = { id: "xai/grok-4.1-fast-non-reasoning", name: "Grok 4.1 Fast Non-Reasoning", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: false, input: ["text"], @@ -1947,7 +1947,7 @@ export const MODELS = { id: "xai/grok-4.1-fast-reasoning", name: "Grok 4.1 Fast Reasoning", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1964,7 +1964,7 @@ export const MODELS = { id: "xai/grok-code-fast-1", name: "Grok Code Fast 1", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1981,7 +1981,7 @@ export const MODELS = { id: "xiaomi/mimo-v2-flash", name: "MiMo V2 Flash", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -1998,7 +1998,7 @@ export const MODELS = { id: "zai/glm-4.5", name: "GLM-4.5", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -2015,7 +2015,7 @@ export const MODELS = { id: "zai/glm-4.5-air", name: "GLM 4.5 Air", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -2032,7 +2032,7 @@ export const MODELS = { id: "zai/glm-4.5v", name: "GLM 4.5V", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -2049,7 +2049,7 @@ export const MODELS = { id: "zai/glm-4.6", name: "GLM 4.6", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], @@ -2066,7 +2066,7 @@ export const MODELS = { id: "zai/glm-4.6v", name: "GLM-4.6V", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -2083,7 +2083,7 @@ export const MODELS = { id: "zai/glm-4.6v-flash", name: "GLM-4.6V-Flash", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text", "image"], @@ -2100,7 +2100,7 @@ export const MODELS = { id: "zai/glm-4.7", name: "GLM 4.7", api: "anthropic-messages", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh", reasoning: true, input: ["text"], diff --git a/packages/ai/src/stream.ts b/packages/ai/src/stream.ts index b27846f4..0c1cf08f 100644 --- a/packages/ai/src/stream.ts +++ b/packages/ai/src/stream.ts @@ -96,7 +96,7 @@ export function getEnvApiKey(provider: any): string | undefined { cerebras: "CEREBRAS_API_KEY", xai: "XAI_API_KEY", openrouter: "OPENROUTER_API_KEY", - "ai-gateway": "AI_GATEWAY_API_KEY", + "vercel-ai-gateway": "AI_GATEWAY_API_KEY", zai: "ZAI_API_KEY", mistral: "MISTRAL_API_KEY", minimax: "MINIMAX_API_KEY", diff --git a/packages/ai/src/types.ts b/packages/ai/src/types.ts index e8632322..63f0cbfb 100644 --- a/packages/ai/src/types.ts +++ b/packages/ai/src/types.ts @@ -56,7 +56,7 @@ export type KnownProvider = | "groq" | "cerebras" | "openrouter" - | "ai-gateway" + | "vercel-ai-gateway" | "zai" | "mistral" | "minimax" diff --git a/packages/ai/test/stream.test.ts b/packages/ai/test/stream.test.ts index 5aa98e1e..e854c130 100644 --- a/packages/ai/test/stream.test.ts +++ b/packages/ai/test/stream.test.ts @@ -601,7 +601,7 @@ describe("Generate E2E Tests", () => { describe.skipIf(!process.env.AI_GATEWAY_API_KEY)( "Vercel AI Gateway Provider (google/gemini-2.5-flash via OpenAI Completions)", () => { - const llm = getModel("ai-gateway", "google/gemini-2.5-flash"); + const llm = getModel("vercel-ai-gateway", "google/gemini-2.5-flash"); it("should complete basic text generation", { retry: 3 }, async () => { await basicTextGeneration(llm); diff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.md index c4ae5d92..fc8feb17 100644 --- a/packages/coding-agent/README.md +++ b/packages/coding-agent/README.md @@ -166,7 +166,7 @@ Add API keys to `~/.pi/agent/auth.json`: | Cerebras | `cerebras` | `CEREBRAS_API_KEY` | | xAI | `xai` | `XAI_API_KEY` | | OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | -| Vercel AI Gateway | `ai-gateway` | `AI_GATEWAY_API_KEY` | +| Vercel AI Gateway | `vercel-ai-gateway` | `AI_GATEWAY_API_KEY` | | ZAI | `zai` | `ZAI_API_KEY` | | MiniMax | `minimax` | `MINIMAX_API_KEY` | @@ -1144,7 +1144,7 @@ pi [options] [@files...] [messages...] | Option | Description | |--------|-------------| -| `--provider ` | Provider: `anthropic`, `openai`, `openai-codex`, `google`, `google-vertex`, `amazon-bedrock`, `mistral`, `xai`, `groq`, `cerebras`, `openrouter`, `ai-gateway`, `zai`, `minimax`, `github-copilot`, `google-gemini-cli`, `google-antigravity`, or custom | +| `--provider ` | Provider: `anthropic`, `openai`, `openai-codex`, `google`, `google-vertex`, `amazon-bedrock`, `mistral`, `xai`, `groq`, `cerebras`, `openrouter`, `vercel-ai-gateway`, `zai`, `minimax`, `github-copilot`, `google-gemini-cli`, `google-antigravity`, or custom | | `--model ` | Model ID | | `--api-key ` | API key (overrides environment) | | `--system-prompt ` | Custom system prompt (text or file path) | diff --git a/packages/coding-agent/src/core/model-resolver.ts b/packages/coding-agent/src/core/model-resolver.ts index d12236e1..e54adb01 100644 --- a/packages/coding-agent/src/core/model-resolver.ts +++ b/packages/coding-agent/src/core/model-resolver.ts @@ -21,7 +21,7 @@ export const defaultModelPerProvider: Record = { "google-vertex": "gemini-3-pro-preview", "github-copilot": "gpt-4o", openrouter: "openai/gpt-5.1-codex", - "ai-gateway": "anthropic/claude-opus-4.5", + "vercel-ai-gateway": "anthropic/claude-opus-4.5", xai: "grok-4-fast-non-reasoning", groq: "openai/gpt-oss-120b", cerebras: "zai-glm-4.6", diff --git a/packages/coding-agent/test/model-resolver.test.ts b/packages/coding-agent/test/model-resolver.test.ts index 2261236d..0471d2d4 100644 --- a/packages/coding-agent/test/model-resolver.test.ts +++ b/packages/coding-agent/test/model-resolver.test.ts @@ -203,7 +203,7 @@ describe("parseModelPattern", () => { describe("default model selection", () => { test("ai-gateway default is opus 4.5", () => { - expect(defaultModelPerProvider["ai-gateway"]).toBe("anthropic/claude-opus-4.5"); + expect(defaultModelPerProvider["vercel-ai-gateway"]).toBe("anthropic/claude-opus-4.5"); }); test("findInitialModel selects ai-gateway default when available", async () => { @@ -211,7 +211,7 @@ describe("default model selection", () => { id: "anthropic/claude-opus-4.5", name: "Claude Opus 4.5", api: "openai-completions", - provider: "ai-gateway", + provider: "vercel-ai-gateway", baseUrl: "https://ai-gateway.vercel.sh/v1", reasoning: true, input: ["text", "image"], @@ -230,7 +230,7 @@ describe("default model selection", () => { modelRegistry: registry, }); - expect(result.model?.provider).toBe("ai-gateway"); + expect(result.model?.provider).toBe("vercel-ai-gateway"); expect(result.model?.id).toBe("anthropic/claude-opus-4.5"); }); }); diff --git a/packages/web-ui/src/components/ProviderKeyInput.ts b/packages/web-ui/src/components/ProviderKeyInput.ts index 7cddb185..011af200 100644 --- a/packages/web-ui/src/components/ProviderKeyInput.ts +++ b/packages/web-ui/src/components/ProviderKeyInput.ts @@ -15,7 +15,7 @@ const TEST_MODELS: Record = { google: "gemini-2.5-flash", groq: "openai/gpt-oss-20b", openrouter: "z-ai/glm-4.6", - "ai-gateway": "anthropic/claude-opus-4.5", + "vercel-ai-gateway": "anthropic/claude-opus-4.5", cerebras: "gpt-oss-120b", xai: "grok-4-fast-non-reasoning", zai: "glm-4.5-air",