Skip to content

Commit b46f000

Browse files
committed
fix(chat): drop mistral models and harden title generation
1 parent 107a43a commit b46f000

2 files changed

Lines changed: 11 additions & 21 deletions

File tree

app/(chat)/api/chat/route.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,13 @@ export async function POST(request: Request) {
244244
);
245245

246246
if (titlePromise) {
247-
const title = await titlePromise;
248-
dataStream.write({ type: "data-chat-title", data: title });
249-
updateChatTitleById({ chatId: id, title });
247+
try {
248+
const title = await titlePromise;
249+
dataStream.write({ type: "data-chat-title", data: title });
250+
updateChatTitleById({ chatId: id, title });
251+
} catch (_) {
252+
/* non-fatal */
253+
}
250254
}
251255
},
252256
generateId: generateUUID,

lib/ai/models.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export const DEFAULT_CHAT_MODEL = "moonshotai/kimi-k2.5";
22

33
export const titleModel = {
4-
id: "mistral/mistral-small",
5-
name: "Mistral Small",
6-
provider: "mistral",
4+
id: "moonshotai/kimi-k2.5",
5+
name: "Kimi K2.5",
6+
provider: "moonshotai",
77
description: "Fast model for title generation",
8-
gatewayOrder: ["mistral"],
8+
gatewayOrder: ["fireworks", "bedrock"],
99
};
1010

1111
export type ModelCapabilities = {
@@ -31,20 +31,6 @@ export const chatModels: ChatModel[] = [
3131
description: "Fast and capable model with tool use",
3232
gatewayOrder: ["bedrock", "deepinfra"],
3333
},
34-
{
35-
id: "mistral/codestral",
36-
name: "Codestral",
37-
provider: "mistral",
38-
description: "Code-focused model with tool use",
39-
gatewayOrder: ["mistral"],
40-
},
41-
{
42-
id: "mistral/mistral-small",
43-
name: "Mistral Small",
44-
provider: "mistral",
45-
description: "Fast vision model with tool use",
46-
gatewayOrder: ["mistral"],
47-
},
4834
{
4935
id: "moonshotai/kimi-k2.5",
5036
name: "Kimi K2.5",

0 commit comments

Comments
 (0)