Skip to content

Promote Vertex to Vercel user BYOK - #5274

Open
chrarnoldus wants to merge 5 commits into
mainfrom
promote-vertex-vercel-byok
Open

Promote Vertex to Vercel user BYOK#5274
chrarnoldus wants to merge 5 commits into
mainfrom
promote-vertex-vercel-byok

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • promote Google Vertex AI to a configurable Vercel user BYOK provider using the documented project, location, and service-account credential shape
  • map Vercel's internal vertexAnthropic endpoint identity to the single public vertex BYOK key so the same credential serves Gemini and Claude models
  • validate structured credentials before storage and add the Vertex setup form to personal and organization BYOK settings

Verification

  • pnpm format:changed
  • git diff --check
  • test suites intentionally left to CI

@chrarnoldus chrarnoldus self-assigned this Aug 14, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of 06a8442b: restoring VercelNonUserByokInferenceProviderIdSchema is complete with no leftover KnownVercelNonUserByok* references, and the main-merge Vercel routing/OpenAI managed-BYOK hunks in this PR's files introduce no Vertex BYOK regressions, secret leakage, or memory leaks.

Files Reviewed (4 files)
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
Previous Review Summaries (2 snapshots, latest commit 964be60)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 964be60)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the follow-up commits: the Vercel provider-ID schemas were consistently renamed to KnownVercel* (no stale references remain), and unknown provider IDs now pass through normalization instead of being schema-filtered — a deliberate, test-covered behavior change in injectExtraProviderModels; the removed !== undefined guards in vercel/index.ts were dead code since openRouterToVercelInferenceProviderId always returned a string. No memory leaks, security issues, or logic regressions introduced.

Files Reviewed (6 files)
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inject-extra-provider-models.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inject-extra-provider-models.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts

Previous review (commit bd22878)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the Vertex user-BYOK promotion across provider-id mapping, routing normalization (vertexAnthropicvertex), credential validation (client + tRPC), BYOK pinning, and the settings UI; the logic is consistent, credential errors never echo secret contents, the earlier usage-billing experiment was fully reverted (net-zero diff on processUsage.ts/llm-proxy-helpers.ts), and no memory leaks or security issues were introduced.

Files Reviewed (10 files)
  • apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
  • apps/web/src/lib/ai-gateway/byok/index.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.test.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inference-provider-id.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/inject-extra-provider-models.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/types.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
  • apps/web/src/routers/byok-router.test.ts
  • apps/web/src/routers/byok-router.ts

Reviewed by grok-4.6 · Input: 119.7K · Output: 10.8K · Cached: 395.3K

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.

1 participant