Skip to content

fix(ai-gateway): map Mistral Large 4 to its Vercel model id - #7292

Merged
chrarnoldus merged 1 commit into
mainfrom
fix/mistral-large-4-vercel-id
Oct 8, 2026
Merged

chrarnoldus merged 1 commit into
mainfrom
fix/mistral-large-4-vercel-id

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • Maps mistralai/mistral-large-4-0 to Vercel's mistral/mistral-large-4 (https://vercel.com/ai-gateway/models/mistral-large-4).
  • Without this mapping, the generic mistralai/ → mistral/ prefix rewrite produced mistral/mistral-large-4-0, which Vercel doesn't serve.

Verification

  • jest mapModelIdToVercel.test.ts (run with the DB setup hook disabled because no Postgres was available): 62 passed

@chrarnoldus chrarnoldus self-assigned this Oct 8, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/web-shared/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.ts
  • packages/web-shared/src/lib/ai-gateway/providers/vercel/mapModelIdToVercel.test.ts

The hardcoded mapping entry mistralai/mistral-large-4-0 → mistral/mistral-large-4 is correctly placed, consistent with sibling Mistral entries, and asserted by a matching test case. No security, logic, or runtime concerns in the changed lines.


Reviewed by deepseek-v4.1-flash · Input: 37.9K · Output: 2.6K · Cached: 249.7K

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