Vercel AI Gateway

Vercel AI Gateway cung cấp một API thống nhất để truy cập hàng trăm model thông qua một endpoint duy nhất.

  • Provider: vercel-ai-gateway
  • Auth: AI_GATEWAY_API_KEY
  • API: Tương thích với Anthropic Messages

Bắt đầu nhanh

  1. Thiết lập API key (khuyên dùng: lưu nó cho Gateway):
openclaw onboard --auth-choice ai-gateway-api-key
  1. Đặt model mặc định:
{
  agents: {
    defaults: {
      model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.5" },
    },
  },
}

Ví dụ chế độ không tương tác

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

Lưu ý về môi trường

Nếu Gateway chạy dưới dạng daemon (launchd/systemd), hãy đảm bảo AI_GATEWAY_API_KEY có sẵn cho tiến trình đó (ví dụ: trong ~/.openclaw/.env hoặc thông qua env.shellEnv).