Create a provider for Vercel AI Gateway
## Summary Create a new AI provider for the [Vercel AI Gateway](https://vercel.com/ai-gateway) so Drupal sites can route AI requests through Vercel's unified gateway endpoint. ## What is Vercel AI Gateway? Vercel AI Gateway is a unified API that gives access to hundreds of AI models (text, image, and video) from providers such as OpenAI, Anthropic, xAI, Google, and others through a **single endpoint** — without managing a separate API key per provider. Key features relevant to a Drupal provider: - **Unified access** — one endpoint, one API key, many providers/models. - **Automatic failover** — requests stay up when an individual model/provider has an outage. - **Observability** — centralized dashboard for token usage, spend, and request details. - **Transparent pricing** — upstream provider list price with no markup; supports Vercel billing or bring-your-own-keys. - **API compatibility** — supports the OpenAI Chat Completions and Anthropic Messages formats, plus the Vercel AI SDK. ## Proposed resolution Build an AI module provider plugin for Vercel AI Gateway: - Authenticate with a Vercel AI Gateway API key. - Use the OpenAI-compatible endpoint so it can reuse existing chat/embeddings normalization where possible (model names are specified as `provider/model`, e.g. `openai/gpt-5.5`). - Implement the relevant operation types (chat, embeddings, and image/video where supported by the gateway). - Support model discovery / configuration of the model list. - Map token usage from the gateway response into the AI module's `TokenUsageDto`. ## Remaining tasks - [ ] Confirm which operation types the gateway exposes and which to support first (chat as MVP). - [ ] Decide whether to ship as a standalone contrib provider module or as a submodule. - [ ] Implement and test the provider plugin. ## References - Vercel AI Gateway: https://vercel.com/ai-gateway
issue