Vercel AI Gateway Provider Setup and Model Selection

Learn how to configure the Vercel AI Gateway provider in OpenClaw, including authentication, model discovery, and usage examples. This guide is for developers integrating hundreds of AI models through a single endpoint.

Read this when

  • You want to use Vercel AI Gateway with OpenClaw
  • You need the API key env var or CLI auth choice

The Vercel AI Gateway offers a single endpoint that exposes a unified API for reaching hundreds of models.

PropertyValue
Providervercel-ai-gateway
Package@openclaw/vercel-ai-gateway-provider
AuthAI_GATEWAY_API_KEY
APIAnthropic Messages compatible
Base URLhttps://ai-gateway.vercel.sh
Model catalogAuto-discovered via /v1/models

Tip

Because OpenClaw automatically discovers the Gateway /v1/models catalog, both the /models vercel-ai-gateway chat command and openclaw models list --provider vercel-ai-gateway carry current model refs like vercel-ai-gateway/openai/gpt-5.5 and vercel-ai-gateway/moonshotai/kimi-k2.6.

Getting started

Install the plugin

openclaw plugins install @openclaw/vercel-ai-gateway-provider

Set the API key

openclaw onboard --auth-choice ai-gateway-api-key

Set a default model

{
  agents: {
    defaults: {
      model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.6" },
    },
  },
}

Verify the model is available

openclaw models list --provider vercel-ai-gateway

Non-interactive example

openclaw onboard --non-interactive --accept-risk --skip-health \
  --mode local \
  --auth-choice ai-gateway-api-key \
  --ai-gateway-api-key "$AI_GATEWAY_API_KEY"

Model ID shorthand

At runtime, OpenClaw normalizes Claude shorthand model refs:

Shorthand inputNormalized model ref
vercel-ai-gateway/claude-opus-4.6vercel-ai-gateway/anthropic/claude-opus-4.6
vercel-ai-gateway/opus-4.6vercel-ai-gateway/anthropic/claude-opus-4-6

Tip

Either form works in your configuration; the canonical anthropic/... ref gets resolved automatically by OpenClaw.

Advanced configuration

Environment variable for daemon processes

When the OpenClaw Gateway operates as a daemon (launchd/systemd), ensure AI_GATEWAY_API_KEY is accessible to that process.

Warning

A key set only in an interactive shell stays hidden from a launchd/systemd daemon unless that environment is explicitly imported. To guarantee the gateway process can access it, place the key in ~/.openclaw/.env or set it via env.shellEnv.

Provider routing

Each request through Vercel AI Gateway is forwarded to the upstream provider indicated by the model ref prefix. As an example, vercel-ai-gateway/anthropic/claude-opus-4.6 goes to Anthropic, vercel-ai-gateway/openai/gpt-5.5 goes to OpenAI, and vercel-ai-gateway/moonshotai/kimi-k2.6 goes to MoonshotAI. A single AI_GATEWAY_API_KEY handles authentication for every upstream provider.

Thinking levels

When OpenClaw recognizes the upstream model prefix, /think options follow it. vercel-ai-gateway/anthropic/... applies the Claude thinking profile, including the adaptive default for Claude 4.6 models. Trusted vercel-ai-gateway/openai/... refs (gpt-5.2 and later, plus Codex variants back to gpt-5.1-codex) expose /think xhigh. Other namespaced refs retain the standard reasoning levels unless their catalog metadata specifies more.

422 words · updated Aug 12, 2026