Skip to content

Support provider.ignore for Vercel routing#4586

Open
chrarnoldus wants to merge 8 commits into
mainfrom
support-vercel-provider-ignore
Open

Support provider.ignore for Vercel routing#4586
chrarnoldus wants to merge 8 commits into
mainfrom
support-vercel-provider-ignore

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • translate OpenRouter provider ignore preferences into a Vercel gateway only list
  • intersect ignored-provider filtering with an existing only list
  • fall back to OpenRouter when provider metadata is unavailable or no Vercel providers remain
  • add focused unit coverage for provider translation and filtering

Verification

  • pnpm exec oxfmt --check apps/web/src/lib/ai-gateway/providers/vercel/index.ts apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts
  • git diff --check
  • Focused Jest was attempted, but the web global test setup could not connect to its PostgreSQL test database before running assertions.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Jul 16, 2026
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@kilo-code-bot

kilo-code-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commit: convertProviderOptions re-expresses the only-list derivation as an immediately-invoked arrow function instead of the prior null-check-plus-ternary form, preserving identical branch logic (no-ignore passthrough, missing-provider-data throw, and ignored-provider exclusion); behavior-preserving refactor, no issues found.

Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
Previous Review Summaries (6 snapshots, latest commit 128136f)

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

Previous review (commit 128136f)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commit: convertProviderOptions now derives the Vercel only list immutably with a single conditional expression instead of a mutable variable reassigned inside an if block, which is a behavior-preserving refactor with no functional change; no issues found.

Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts

Previous review (commit 11d6236)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commit: applyVercelSettings now computes vercelModelId once and passes it explicitly into convertProviderOptions instead of relying on the mutated requestToMutate.body.model, which is a behavior-preserving refactor with no functional change; no issues found.

Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts

Previous review (commit 0f89d4d)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commit: applyVercelSettings now computes vercelModelId once and passes it explicitly into convertProviderOptions instead of relying on the mutated requestToMutate.body.model, which is a behavior-preserving refactor with no functional change; no issues found.

Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts

Previous review (commit bd1dc18)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commit: convertProviderOptions and shouldRouteToVercel were updated to stop mutating provider.only and instead consistently intersect the ignored-provider filtering with the existing only list via getVercelInferenceProvidersExcludingIgnored, the caller in provider-definitions.ts was updated to await the now-async applyVercelSettings, and unit tests were extended to cover the new async behavior and non-mutation of provider.only; no issues found.

Files Reviewed (3 files)
  • apps/web/src/lib/ai-gateway/providers/provider-definitions.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts

Previous review (commit b69cce7)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the new commit: convertProviderOptions now filters the Vercel only list by the ignored providers, mirroring the existing getVercelInferenceProvidersExcludingIgnored logic, and is validated by a new unit test; no issues found.

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts

Previous review (commit 891ed38)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the Vercel provider-ignore translation logic and its tests; the ignore/only intersection, cache-unavailable fallback, and mutation of provider.only are consistent and correctly exercised by the new unit tests.

Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/vercel/index.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/index.test.ts

Reviewed by claude-sonnet-5 · Input: 24 · Output: 5.1K · Cached: 544.4K

Review guidance: REVIEW.md from base branch main

chrarnoldus and others added 6 commits July 16, 2026 12:51
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
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