An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Enforce speed model selection for guests
Yoshiki Miurac9afcbf43069
diff --git a/app/api/chat/route.ts b/app/api/chat/route.tsindex 2bc9e164..23b7096d 100644--- a/app/api/chat/route.ts+++ b/app/api/chat/route.ts@@ -95,9 +95,16 @@ export async function POST(req: Request) {? (searchModeCookie as SearchMode): 'quick'+ const modelCookieStore = isGuest+ ? ({+ get: (name: string) =>+ name === 'modelType' ? ({ value: 'speed' } as const) : cookieStore.get(name)+ } as typeof cookieStore)+ : cookieStore+// Select the appropriate model based on model type preference and search modeconst selectedModel = selectModel({- cookieStore,+ cookieStore: modelCookieStore,searchMode})