Skip to content

Comments

Allow all recommended model for Vercel routing#417

Draft
chrarnoldus wants to merge 2 commits intomainfrom
christiaan/vercel
Draft

Allow all recommended model for Vercel routing#417
chrarnoldus wants to merge 2 commits intomainfrom
christiaan/vercel

Conversation

@chrarnoldus
Copy link
Contributor

No description provided.

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds Alibaba/Qwen provider support for Vercel routing and replaces the hardcoded VERCEL_ROUTING_ALLOW_LIST with the shared preferredModels list. Key changes:

  • Alibaba provider added to OpenRouterInferenceProviderIdSchema and VercelNonUserByokInferenceProviderIdSchema, with qwen prefix mapping to alibaba.
  • Type widening from VercelUserByokInferenceProviderId to VercelInferenceProviderId in the model-prefix mapping and inferVercelFirstPartyInferenceProviderForModel return type — correctly accommodating non-BYOK providers.
  • Safe BYOK filtering via VercelUserByokInferenceProviderIdSchema.safeParse() in inferUserByokProviderForModel — a good defensive pattern that prevents non-BYOK providers (like alibaba) from being returned as BYOK provider IDs.
  • Routing logic restructured in shouldRouteToVercel to check isOpenRouterModel upfront for all paths (not just universal routing), which is more correct.
  • Removed stale model mappings (google/gemini-3-flash-preview, mistralai/devstral-2512:free) from vercelModelIdMapping — safe since these models either aren't in preferredModels or Vercel now supports the original model names.
Files Reviewed (2 files)
  • src/lib/providers/openrouter/inference-provider-id.ts - 0 issues
  • src/lib/providers/vercel.ts - 0 issues

@chrarnoldus chrarnoldus marked this pull request as draft February 20, 2026 18:31
@chrarnoldus chrarnoldus marked this pull request as ready for review February 20, 2026 20:04
@chrarnoldus chrarnoldus marked this pull request as draft February 20, 2026 20:47
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