Skip to content

fix(ai-gateway): route Laguna S through OpenRouter only - #4895

Merged
chrarnoldus merged 1 commit into
mainfrom
repeated-mule
Jul 30, 2026
Merged

fix(ai-gateway): route Laguna S through OpenRouter only#4895
chrarnoldus merged 1 commit into
mainfrom
repeated-mule

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • remove the Vercel model ID mapping for poolside/laguna-s-2.1:free
  • keep the OpenRouter ID unchanged so it no longer matches the Vercel -free model entry
  • add a regression assertion for the OpenRouter-only routing behavior

Verification

  • pnpm --filter web test -- --runInBand src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.test.ts
  • pnpm --filter web lint
  • pnpm --filter web typecheck
  • git diff --check

Verification ran successfully with Node 26.5.0; the repository declares Node >=24 <25.

@chrarnoldus chrarnoldus self-assigned this Jul 30, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Clean, self-consistent revert of the poolside/laguna-s-2.1:free Vercel model-ID mapping plus a matching regression test; verified with high confidence that no other code path still depends on the removed entry.

Review Notes
  • Removing the entry makes mapModelIdToVercel('poolside/laguna-s-2.1:free') fall through to the kilo-exclusive lookup (no match — the ID is not registered in kiloExclusiveModels) and then to inferVercelFirstPartyInferenceProviderForModel, which returns null because poolside is absent from modelPrefixToVercelInferenceProviderMapping. The ID is therefore returned unchanged, so the new assertion holds.
  • Downstream consumers (byok/index.ts, byok-router.ts, sync-providers.ts, providers/vercel/index.ts) look the mapped ID up in vercelModelMetadata; the unmapped ID will simply miss, which matches the stated intent of OpenRouter-only routing.
  • Searched for poolside / laguna across the repo: no leftover references to poolside/laguna-s-2.1-free and no reverse Vercel→OpenRouter mapping to update.
  • apps/web/src/lib/ai-gateway/AGENTS.md's forbiddenFreeModelIds rule does not apply — this ID is not a Kilo-exclusive free model, and the model itself is not being removed.
Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.ts
  • apps/web/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.test.ts

Reviewed by claude-opus-5 · Input: 26 · Output: 6.1K · Cached: 554.8K

Review guidance: REVIEW.md from base branch main

@chrarnoldus
chrarnoldus merged commit a033c67 into main Jul 30, 2026
16 checks passed
@chrarnoldus
chrarnoldus deleted the repeated-mule branch July 30, 2026 16:04
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