diff --git a/src/app/api/dashboard/models/route.ts b/src/app/api/dashboard/models/route.ts index 4889be8..d13ba48 100644 --- a/src/app/api/dashboard/models/route.ts +++ b/src/app/api/dashboard/models/route.ts @@ -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 }); } diff --git a/src/app/api/dashboard/playground/route.ts b/src/app/api/dashboard/playground/route.ts index 888392e..912bf14 100644 --- a/src/app/api/dashboard/playground/route.ts +++ b/src/app/api/dashboard/playground/route.ts @@ -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) {