Skip to content

Log Vercel request IDs for API requests#4489

Open
chrarnoldus wants to merge 2 commits into
mainfrom
log-vercel-request-id
Open

Log Vercel request IDs for API requests#4489
chrarnoldus wants to merge 2 commits into
mainfrom
log-vercel-request-id

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • persist the inbound x-vercel-id header in api_request_log.vercel_request_id
  • limit and normalize the header through the existing gateway header helper
  • add route coverage and a generated Drizzle migration in a separate commit

Validation

  • pnpm format
  • targeted oxlint on changed TypeScript files
  • pnpm --filter @kilocode/db typecheck
  • POSTGRES_URL=... pnpm drizzle check
  • changed-package typecheck exceeded the 120-second sandbox limit
  • focused Jest suite could not initialize because Docker/Postgres is unavailable in the sandbox; all failures occurred during database setup

chrarnoldus and others added 2 commits July 10, 2026 12:21
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Jul 10, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed a small, well-tested addition that persists the inbound x-vercel-id header as vercel_request_id on api_request_log, with no security, correctness, or migration concerns.

Files Reviewed (7 files)
  • apps/web/src/app/api/openrouter/[...path]/route.ts
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts
  • apps/web/src/lib/ai-gateway/handleRequestLogging.ts
  • packages/db/src/schema.ts
  • packages/db/src/migrations/0182_powerful_blacklash.sql
  • packages/db/src/migrations/meta/0182_snapshot.json (generated)
  • packages/db/src/migrations/meta/_journal.json (generated)

Reviewed by claude-sonnet-5-20260630 · Input: 26 · Output: 4.5K · Cached: 696.5K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants