Vercel AI Gateway(网关)
The Vercel AI Gateway(网关) provides a unified API to access hundreds of models through a single endpoint.
| 属性 | 值 |
|---|---|
| 提供商 | vercel-ai-gateway |
| 身份验证 | AI_GATEWAY_API_KEY |
| API | Anthropic Messages 兼容 |
| 模型目录 | 通过 /v1/models 自动发现 |
设置 API 密钥
运行新手引导并选择 AI Gateway(网关) 身份验证选项:
Terminal window openclaw onboard --auth-choice ai-gateway-api-key设置默认模型
将模型添加到您的 OpenClaw 配置中:
{agents: {defaults: {model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.6" },},},}验证模型是否可用
Terminal window openclaw models list --provider vercel-ai-gateway
非交互式示例
Section titled “非交互式示例”对于脚本或 CI 设置,请在命令行中传递所有值:
openclaw onboard --non-interactive \ --mode local \ --auth-choice ai-gateway-api-key \ --ai-gateway-api-key "$AI_GATEWAY_API_KEY"模型 ID 简写
Section titled “模型 ID 简写”OpenClaw 接受 Vercel Claude 简写模型引用,并在 运行时将其规范化:
| 简写输入 | 规范化的模型引用 |
|---|---|
vercel-ai-gateway/claude-opus-4.6 | vercel-ai-gateway/anthropic/claude-opus-4.6 |
vercel-ai-gateway/opus-4.6 | vercel-ai-gateway/anthropic/claude-opus-4-6 |
Environment variable for daemon processes
If the OpenClaw Gateway(网关) runs as a daemon (launchd/systemd), make sure
AI_GATEWAY_API_KEY is available to that process.
Provider routing
Vercel AI Gateway(网关) routes requests to the upstream 提供商 based on the 模型
ref prefix. For example, vercel-ai-gateway/anthropic/claude-opus-4.6 routes
through Anthropic, while vercel-ai-gateway/openai/gpt-5.5 routes through
OpenAI and vercel-ai-gateway/moonshotai/kimi-k2.6 routes through
MoonshotAI. Your single AI_GATEWAY_API_KEY handles authentication for all
upstream providers.
Thinking levels
/think options follow trusted upstream 模型 prefixes when OpenClaw knows
the upstream 提供商 contract. vercel-ai-gateway/anthropic/... uses the
Claude thinking profile, including adaptive defaults for Claude 4.6 models.
vercel-ai-gateway/openai/gpt-5.4, gpt-5.5, and Codex-style refs expose
/think xhigh just like the direct OpenAI/OpenAI Codex providers. Other
namespaced refs keep the normal reasoning levels unless their catalog
metadata declares more.
选择提供商、模型引用和故障转移行为。
常规故障排除和常见问题。