Skip to content

Commit c7d324f

Browse files
committed
fix(vercel): accept reranking model type from API
The Vercel AI Gateway API now returns models with type "reranking", which caused the generate-vercel script to fail schema validation. Add "reranking" to the ModelType enum and skip these models in the main loop, matching the existing pattern for image/video types that OpenCode does not consume.
1 parent 38f6b7d commit c7d324f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/core/script/generate-vercel.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ enum ModelType {
2020
Embedding = "embedding",
2121
Image = "image",
2222
Video = "video",
23+
Reranking = "reranking",
2324
}
2425

2526
enum SkipZeroFields {
@@ -505,8 +506,12 @@ async function main() {
505506
let unchanged = 0;
506507

507508
for (const apiModel of apiModels) {
508-
// Skip these since OpenCode does not support image / video generation yet
509-
if (apiModel.type === ModelType.Image || apiModel.type === ModelType.Video) {
509+
// Skip these since OpenCode does not support image / video / reranking yet
510+
if (
511+
apiModel.type === ModelType.Image ||
512+
apiModel.type === ModelType.Video ||
513+
apiModel.type === ModelType.Reranking
514+
) {
510515
continue;
511516
}
512517

0 commit comments

Comments
 (0)