firewall-ai-gateway-debug

bởi vercel

Gỡ lỗi tường lửa và Vercel AI Gateway cho vercel-openclaw: danh sách cho phép chính sách mạng, làm mới token OIDC, quy tắc chuyển đổi AI Gateway, tường lửa…

npx skills add https://github.com/vercel-labs/vercel-openclaw --skill firewall-ai-gateway-debug

Firewall AI Gateway Debug

Use this skill for model-call failures, egress blocks, network policy drift, or AI Gateway token refresh problems.

Evidence First

Collect:

  • GET /api/admin/preflight or launch verification preflight evidence.
  • GET /api/admin/logs filtered for firewall., token., gateway., watchdog..
  • GET /api/admin/sandbox-diag.
  • Current firewall mode and learned/allowed domains from admin surfaces.
  • Sanitized model-call or gateway error body. Do not print Authorization tokens.

Critical Splits

  • AI Gateway credential unavailable vs expired vs circuit-breaker-open.
  • Static API key bypass vs OIDC token path.
  • Firewall learning/allowlist issue vs model provider/API issue.
  • OPENAI_BASE_URL inside sandbox is present, while Authorization is injected by network policy transform.
  • Policy object shape changes when an AI Gateway token exists.

Invariants

  • AI Gateway token never enters sandbox files or env.
  • ai-gateway.vercel.sh stays allowed even in enforcing mode.
  • Token refresh applies sandbox.update({ networkPolicy }); it should not rewrite config files or restart the gateway.
  • Public/admin display URLs must not expose deployment-protection bypass secrets.

Fix Boundaries

  • Primary: src/server/firewall/{domains,policy,state}.ts.
  • Token path: src/server/sandbox/lifecycle.ts, src/server/deploy-preflight.ts.
  • Public URLs: src/server/public-url.ts.
  • Tests: firewall policy tests, token refresh tests, launch-verify/preflight tests.
  • Docs: docs/environment-variables.md, docs/deployment-protection.md, lat.md/sandbox-lifecycle.md.

Verification

node scripts/verify.mjs --steps=test,typecheck
lat check

For live incidents, prove a model call succeeds after the policy/token change and that no token value appears in logs, UI, or sandbox config.

Thêm skills từ vercel

benchmark-sandbox
vercel
Chạy các kịch bản đánh giá vercel-plugin trong Vercel Sandboxes thay vì các bảng WezTerm cục bộ. Cung cấp các microVM tạm thời với Claude Code và plugin được cài đặt sẵn,…
official
emil-design-eng
vercel
Kỹ năng này mã hóa triết lý của Emil Kowalski về trau chuốt giao diện người dùng, thiết kế thành phần, quyết định hoạt ảnh và những chi tiết vô hình giúp phần mềm mang lại cảm giác tuyệt vời.
official
vercel-react-best-practices
vercel
Hướng dẫn tối ưu hiệu suất React và Next.js từ Vercel Engineering. Kỹ năng này nên được sử dụng khi viết, xem xét hoặc tái cấu trúc mã React/Next.js…
official
vercel-react-best-practices
vercel
Hướng dẫn tối ưu hiệu suất React và Next.js từ Vercel Engineering. Kỹ năng này nên được sử dụng khi viết, xem xét hoặc tái cấu trúc mã React/Next.js…
official
write-guide
vercel
Tạo một hướng dẫn kỹ thuật dạy một trường hợp sử dụng thực tế thông qua các ví dụ tiến dần. Các khái niệm chỉ được giới thiệu khi người đọc cần đến chúng.
official
release
vercel
Phát hành vercel-plugin — chạy các cổng, tăng phiên bản, tạo tạo phẩm, commit và push. Sử dụng khi được yêu cầu "phát hành", "ship", "tăng và push", hoặc "cắt một bản phát hành".
official
deepsec
vercel
Chạy DeepSec trên bản checkout dự án Vercel từ dev3000. Sử dụng để thiết lập DeepSec một chạm, khởi tạo ngữ cảnh dự án, xử lý lần đầu có giới hạn, và…
official
backport-pr
vercel
Backport một pull request Next.js đã được merge từ canary sang một nhánh phát hành trước đó như next-16-2. Sử dụng khi người dùng yêu cầu backport, cherry-pick, hoặc mở một…
official