diff --git a/src/routes/api/conversation/[id]/+server.ts b/src/routes/api/conversation/[id]/+server.ts index 5ba4aa7a1dd..a91613d09e2 100644 --- a/src/routes/api/conversation/[id]/+server.ts +++ b/src/routes/api/conversation/[id]/+server.ts @@ -1,6 +1,7 @@ import { collections } from "$lib/server/database"; import { authCondition } from "$lib/server/auth"; import { z } from "zod"; +import { models } from "$lib/server/models"; import { ObjectId } from "mongodb"; export async function GET({ locals, params }) { @@ -29,6 +30,7 @@ export async function GET({ locals, params }) { webSearch: message.webSearch, files: message.files, })), + model: models.filter((m) => m.id == conv.model)[0], }; return Response.json(res); } else { diff --git a/src/routes/api/conversations/+server.ts b/src/routes/api/conversations/+server.ts index f4bb4fc389b..3280b8ed969 100644 --- a/src/routes/api/conversations/+server.ts +++ b/src/routes/api/conversations/+server.ts @@ -1,4 +1,5 @@ import { collections } from "$lib/server/database"; +import { models } from "$lib/server/models"; import { authCondition } from "$lib/server/auth"; import type { Conversation } from "$lib/types/Conversation"; @@ -29,6 +30,7 @@ export async function GET({ locals, url }) { updatedAt: conv.updatedAt, modelId: conv.model, assistantId: conv.assistantId, + model: models.filter((m) => m.id == conv.model)[0], })); return Response.json(res); diff --git a/src/routes/api/models/+server.ts b/src/routes/api/models/+server.ts index ab70f22b5e7..6cffb9974f9 100644 --- a/src/routes/api/models/+server.ts +++ b/src/routes/api/models/+server.ts @@ -18,6 +18,7 @@ export async function GET() { preprompt: model.preprompt ?? "", multimodal: model.multimodal ?? false, unlisted: model.unlisted ?? false, + tools: model.tools ?? false, })); return Response.json(res); }