vercel-ai-gateway

Vercel AI Gateway supports the OpenAI-compatible API, so you can use the openai-generic provider with an overridden base_url.

BAML
1client<llm> VercelClient {
2 provider "openai-generic"
3 options {
4 base_url "https://ai-gateway.vercel.sh/v1"
5 api_key env.VERCEL_AI_GATEWAY_TOKEN
6 // Example models routed via the gateway
7 // model "anthropic/claude-3-5-sonnet-latest"
8 // model "openai/gpt-4o-mini"
9 }
10}

See the Vercel docs for details on configuring providers and models behind your gateway: Vercel AI Gateway (OpenAI compatible).