Vercel AI Gateway Provider Setup and Model Selection

Set up the Vercel AI Gateway provider with the AI_GATEWAY_API_KEY and let OpenClaw auto-discover the model catalog. Covers install, auth, and model refs for users configuring this provider.

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 exposes hundreds of models behind one endpoint and a single, unified API.

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

With your API key, OpenClaw discovers the Gateway /v1/models catalog on its own. As a result, the /models vercel-ai-gateway chat command and openclaw models list --provider vercel-ai-gateway both offer up-to-date model refs, for instance 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

When a Gateway is already running, the installation is applied to it right away. If not, it takes effect the next time the Gateway starts. See Apply changes and inspect.

Set the API key

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

Check the default model

During onboarding, the default is set to the first recommended model that your key is able to use. Pick a different one by setting any model from the list below:

{
  agents: {
    defaults: {
      model: { primary: "vercel-ai-gateway/<model-id>" },
    },
  },
}

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"

Token Pass

With Vercel Token Pass, a Token Pass API key is used instead of a regular AI Gateway API key. Configure it through the same auth choice. For that key, Vercel lists Token Pass models only, which means openclaw models list --provider vercel-ai-gateway shows precisely the models the key can use. The default is chosen from among those models during onboarding.

Model ID shorthand

Claude shorthand model refs are normalized by OpenClaw at runtime:

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. OpenClaw resolves the full anthropic/... ref for you.

Advanced configuration

Environment variable for daemon processes

When the OpenClaw Gateway runs as a daemon (launchd/systemd), confirm that AI_GATEWAY_API_KEY can be reached by that process.

Warning

A key exported only in an interactive shell stays invisible to a launchd/systemd daemon unless that environment is imported explicitly. Put the key in ~/.openclaw/.env or set it through env.shellEnv, so the gateway process is able to read it.

Provider routing

Each request is routed by Vercel AI Gateway to the upstream provider named in the model ref prefix. For instance, vercel-ai-gateway/anthropic/claude-opus-4.6 goes through Anthropic, vercel-ai-gateway/openai/gpt-5.5 goes through OpenAI, and vercel-ai-gateway/moonshotai/kimi-k2.6 goes through MoonshotAI. A single AI_GATEWAY_API_KEY authenticates every upstream provider.

Thinking levels

When OpenClaw recognizes the upstream model prefix, /think options follow it. The Claude thinking profile applies to vercel-ai-gateway/anthropic/..., including the adaptive default for Claude 4.6 models. /think xhigh is exposed by trusted vercel-ai-gateway/openai/... refs (gpt-5.2 and newer, along with Codex variants down to gpt-5.1-codex). Namespaced refs outside that set keep the standard reasoning levels, unless their catalog metadata declares more.

App attribution

Vercel's documented app-attribution headers, HTTP-Referer: https://openclaw.ai and X-Title: OpenClaw, are carried on requests to ai-gateway.vercel.sh. The same holds for custom provider ids whose baseUrl points at AI Gateway. No attribution headers are added to a custom proxy baseUrl.

592 words · updated Oct 26, 2026