feat: show Mosaic in dashboard model dropdowns (playground + models list)
This commit is contained in:
1 parent
9c9ff51b87
commit
94b86e92ca
2 files changed
+13
-5
No files matched your search
@@ -12,5 +12,8 @@ export async function GET() {
|
||||
});
|
||||
|
||||
const models = [...new Set(mappings.map((m) => m.logicalModelId as string))].sort();
|
||||
if (!models.includes("mosaic")) {
|
||||
models.unshift("mosaic");
|
||||
}
|
||||
return NextResponse.json({ data: models });
|
||||
}
|
||||
@@ -72,11 +72,16 @@ export async function GET() {
|
||||
const isFineTuned = (id: string) =>
|
||||
id.startsWith("ft:") || id.includes(":personal:") || id.includes("ckpt-step-");
|
||||
|
||||
return NextResponse.json({
|
||||
data: [...byModel.entries()]
|
||||
.filter(([id]) => !isFineTuned(id))
|
||||
.map(([id, info]) => ({ id, providerId: info.providerId, modelType: info.modelType })),
|
||||
});
|
||||
const modelList = [...byModel.entries()]
|
||||
.filter(([id]) => !isFineTuned(id))
|
||||
.map(([id, info]) => ({ id, providerId: info.providerId, modelType: info.modelType }));
|
||||
|
||||
// Always include Mosaic as a virtual model at the top
|
||||
if (!modelList.some((m) => m.id === "mosaic")) {
|
||||
modelList.unshift({ id: "mosaic", providerId: "mosaic", modelType: "chat" });
|
||||
}
|
||||
|
||||
return NextResponse.json({ data: modelList });
|
||||
}
|
||||
|
||||
export async function POST(req: Request) {
|
||||
|
||||
Reference in new issue
Block a user