diff --git a/components/chat-header.tsx b/components/chat-header.tsx index c1f7ee4..6e67e93 100644 --- a/components/chat-header.tsx +++ b/components/chat-header.tsx @@ -1,17 +1,17 @@ -"use client"; +'use client'; -import Link from "next/link"; -import { useRouter } from "next/navigation"; -import { useWindowSize } from "usehooks-ts"; +import Link from 'next/link'; +import { useRouter } from 'next/navigation'; +import { useWindowSize } from 'usehooks-ts'; -import { ModelSelector } from "@/components/model-selector"; -import { SidebarToggle } from "@/components/sidebar-toggle"; -import { Button } from "@/components/ui/button"; -import { PlusIcon, VercelIcon } from "./icons"; -import { useSidebar } from "./ui/sidebar"; -import { memo } from "react"; -import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip"; -import { VisibilityType, VisibilitySelector } from "./visibility-selector"; +import { ModelSelector } from '@/components/model-selector'; +import { SidebarToggle } from '@/components/sidebar-toggle'; +import { Button } from '@/components/ui/button'; +import { PlusIcon, VercelIcon } from './icons'; +import { useSidebar } from './ui/sidebar'; +import { memo } from 'react'; +import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip'; +import { VisibilityType, VisibilitySelector } from './visibility-selector'; function PureChatHeader({ chatId, @@ -40,7 +40,7 @@ function PureChatHeader({ variant="outline" className="order-2 md:order-1 md:px-2 px-2 md:h-fit ml-auto md:ml-0" onClick={() => { - router.push("/"); + router.push('/'); router.refresh(); }} > diff --git a/docs/02-update-models.md b/docs/02-update-models.md index c487b1c..6d78bd4 100644 --- a/docs/02-update-models.md +++ b/docs/02-update-models.md @@ -10,7 +10,7 @@ import { xai } from "@ai-sdk/xai"; export const myProvider = customProvider({ languageModels: { - "chat-model-small": xai("grok-2-1212"), + "chat-model": xai("grok-2-1212"), "chat-model-reasoning": wrapLanguageModel({ model: fireworks("accounts/fireworks/models/deepseek-r1"), middleware: extractReasoningMiddleware({ tagName: "think" }), @@ -27,7 +27,7 @@ export const myProvider = customProvider({ You can replace the models with any other provider of your choice. You will need to install the provider library and switch the models accordingly. -For example, if you want to use Anthropic's `claude-3-5-sonnet` model for `chat-model-large`, you can replace the `xai` model with the `anthropic` model as shown below. +For example, if you want to use Anthropic's `claude-3-5-sonnet` model for `chat-model`, you can replace the `xai` model with the `anthropic` model as shown below. ```ts import { customProvider } from "ai"; @@ -35,8 +35,7 @@ import { anthropic } from "@ai-sdk/anthropic"; export const myProvider = customProvider({ languageModels: { - "chat-model-small": openai("gpt-4o-mini"), - "chat-model-large": anthropic("claude-3-5-sonnet"), // Replace openai with anthropic + "chat-model": anthropic("claude-3-5-sonnet"), // Replace xai with anthropic "chat-model-reasoning": wrapLanguageModel({ model: fireworks("accounts/fireworks/models/deepseek-r1"), middleware: extractReasoningMiddleware({ tagName: "think" }), diff --git a/lib/ai/models.ts b/lib/ai/models.ts index a29652a..ab3e471 100644 --- a/lib/ai/models.ts +++ b/lib/ai/models.ts @@ -1,4 +1,4 @@ -export const DEFAULT_CHAT_MODEL: string = 'chat-model-small'; +export const DEFAULT_CHAT_MODEL: string = 'chat-model'; interface ChatModel { id: string; @@ -8,9 +8,9 @@ interface ChatModel { export const chatModels: Array = [ { - id: 'chat-model-small', - name: 'Small model', - description: 'Small model for fast, lightweight tasks', + id: 'chat-model', + name: 'Chat model', + description: 'Primary model for all-purpose chat', }, { id: 'chat-model-reasoning', diff --git a/lib/ai/providers.ts b/lib/ai/providers.ts index 066e5f1..0d1d427 100644 --- a/lib/ai/providers.ts +++ b/lib/ai/providers.ts @@ -17,8 +17,7 @@ import { export const myProvider = isTestEnvironment ? customProvider({ languageModels: { - 'chat-model-small': chatModel, - 'chat-model-large': chatModel, + 'chat-model': chatModel, 'chat-model-reasoning': reasoningModel, 'title-model': titleModel, 'artifact-model': artifactModel, @@ -26,7 +25,7 @@ export const myProvider = isTestEnvironment }) : customProvider({ languageModels: { - 'chat-model-small': xai('grok-2-1212'), + 'chat-model': xai('grok-2-1212'), 'chat-model-reasoning': wrapLanguageModel({ model: fireworks('accounts/fireworks/models/deepseek-r1'), middleware: extractReasoningMiddleware({ tagName: 'think' }),