@nightowlsdev/provider-vercel-gateway
Adapter/ModelAny model via the Vercel AI Gateway for Night Owls swarms, one key, all providers.
What it does
Exposes `vercelGatewayModels(opts?)`, a model factory for `defineSwarm({ modelFactory })`. It wraps `@ai-sdk/gateway`'s `createGateway`, mapping a `provider/model` id (e.g. `anthropic/claude-sonnet-4-6`) to an AI SDK `LanguageModelV3` routed through the Vercel AI Gateway, so a single key reaches every provider. Reads `AI_GATEWAY_API_KEY` by default; pass `{ apiKey }` to override. Ships a `nightOwlsPlugin` manifest for CLI scaffolding; it composes with the other `provider-*` adapters, so `createModelFactory` can route some agents through the gateway and others direct. Like the other model adapters it imports only its AI SDK provider (`@ai-sdk/gateway`), zero `@mastra/*`.
Install
pnpm add @nightowlsdev/provider-vercel-gatewayKey exports
- vercelGatewayModels
- nightOwlsPlugin
Usage
import { defineSwarm } from "@nightowlsdev/core";
import { vercelGatewayModels } from "@nightowlsdev/provider-vercel-gateway";
// One key, all providers via the Vercel AI Gateway. Reads AI_GATEWAY_API_KEY.
const swarm = defineSwarm({ agents, modelFactory: vercelGatewayModels() });