Skip to content

Commit dfda911

Browse files
feat: use grok-3-mini as reasoning model (vercel#922)
1 parent 7905345 commit dfda911

File tree

6 files changed

+59
-72
lines changed

6 files changed

+59
-72
lines changed

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ AUTH_SECRET=****
77
# Get your xAI API Key here for chat and image models: https://console.x.ai/
88
XAI_API_KEY=****
99

10-
# Get your Groq API Key here for reasoning models: https://console.groq.com/keys
11-
GROQ_API_KEY=****
12-
1310
# Instructions to create a Vercel Blob Store here: https://vercel.com/docs/storage/vercel-blob
1411
BLOB_READ_WRITE_TOKEN=****
1512

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This template ships with [xAI](https://x.ai) `grok-2-1212` as the default chat m
4242

4343
You can deploy your own version of the Next.js AI Chatbot to Vercel with one click:
4444

45-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fai-chatbot&env=AUTH_SECRET&envDescription=Generate%20a%20random%20secret%20to%20use%20for%20authentication&envLink=https%3A%2F%2Fgenerate-secret.vercel.app%2F32&project-name=my-awesome-chatbot&repository-name=my-awesome-chatbot&demo-title=AI%20Chatbot&demo-description=An%20Open-Source%20AI%20Chatbot%20Template%20Built%20With%20Next.js%20and%20the%20AI%20SDK%20by%20Vercel&demo-url=https%3A%2F%2Fchat.vercel.ai&products=%5B%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22ai%22%2C%22productSlug%22%3A%22grok%22%2C%22integrationSlug%22%3A%22xai%22%7D%2C%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22ai%22%2C%22productSlug%22%3A%22api-key%22%2C%22integrationSlug%22%3A%22groq%22%7D%2C%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22storage%22%2C%22productSlug%22%3A%22neon%22%2C%22integrationSlug%22%3A%22neon%22%7D%2C%7B%22type%22%3A%22blob%22%7D%5D)
45+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fai-chatbot&env=AUTH_SECRET&envDescription=Generate%20a%20random%20secret%20to%20use%20for%20authentication&envLink=https%3A%2F%2Fgenerate-secret.vercel.app%2F32&project-name=my-awesome-chatbot&repository-name=my-awesome-chatbot&demo-title=AI%20Chatbot&demo-description=An%20Open-Source%20AI%20Chatbot%20Template%20Built%20With%20Next.js%20and%20the%20AI%20SDK%20by%20Vercel&demo-url=https%3A%2F%2Fchat.vercel.ai&products=%5B%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22ai%22%2C%22productSlug%22%3A%22grok%22%2C%22integrationSlug%22%3A%22xai%22%7D%2C%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22storage%22%2C%22productSlug%22%3A%22neon%22%2C%22integrationSlug%22%3A%22neon%22%7D%2C%7B%22type%22%3A%22blob%22%7D%5D)
4646

4747
## Running locally
4848

components/chat-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function PureChatHeader({
7272
asChild
7373
>
7474
<Link
75-
href={`https://vercel.com/new/clone?repository-url=https://github.com/vercel/ai-chatbot&env=AUTH_SECRET&envDescription=Learn more about how to get the API Keys for the application&envLink=https://github.com/vercel/ai-chatbot/blob/main/.env.example&demo-title=AI Chatbot&demo-description=An Open-Source AI Chatbot Template Built With Next.js and the AI SDK by Vercel.&demo-url=https://chat.vercel.ai&products=[{"type":"integration","protocol":"ai","productSlug":"grok","integrationSlug":"xai"},{"type":"integration","protocol":"ai","productSlug":"api-key","integrationSlug":"groq"},{"type":"integration","protocol":"storage","productSlug":"neon","integrationSlug":"neon"},{"type":"blob"}]`}
75+
href={`https://vercel.com/new/clone?repository-url=https://github.com/vercel/ai-chatbot&env=AUTH_SECRET&envDescription=Learn more about how to get the API Keys for the application&envLink=https://github.com/vercel/ai-chatbot/blob/main/.env.example&demo-title=AI Chatbot&demo-description=An Open-Source AI Chatbot Template Built With Next.js and the AI SDK by Vercel.&demo-url=https://chat.vercel.ai&products=[{"type":"integration","protocol":"ai","productSlug":"grok","integrationSlug":"xai"},{"type":"integration","protocol":"storage","productSlug":"neon","integrationSlug":"neon"},{"type":"blob"}]`}
7676
target="_noblank"
7777
>
7878
<VercelIcon size={16} />

lib/ai/providers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
extractReasoningMiddleware,
44
wrapLanguageModel,
55
} from 'ai';
6-
import { groq } from '@ai-sdk/groq';
76
import { xai } from '@ai-sdk/xai';
87
import { isTestEnvironment } from '../constants';
98
import {
@@ -26,7 +25,7 @@ export const myProvider = isTestEnvironment
2625
languageModels: {
2726
'chat-model': xai('grok-2-1212'),
2827
'chat-model-reasoning': wrapLanguageModel({
29-
model: groq('deepseek-r1-distill-llama-70b'),
28+
model: xai('grok-3-mini-beta'),
3029
middleware: extractReasoningMiddleware({ tagName: 'think' }),
3130
}),
3231
'title-model': xai('grok-2-1212'),

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
"test": "export PLAYWRIGHT=True && pnpm exec playwright test --workers=4"
2020
},
2121
"dependencies": {
22-
"@ai-sdk/groq": "^1.2.3",
23-
"@ai-sdk/react": "^1.2.5",
24-
"@ai-sdk/xai": "^1.2.6",
22+
"@ai-sdk/react": "^1.2.8",
23+
"@ai-sdk/xai": "^1.2.10",
2524
"@codemirror/lang-javascript": "^6.2.2",
2625
"@codemirror/lang-python": "^6.1.6",
2726
"@codemirror/state": "^6.5.0",
@@ -40,7 +39,7 @@
4039
"@vercel/analytics": "^1.3.1",
4140
"@vercel/blob": "^0.24.1",
4241
"@vercel/postgres": "^0.10.0",
43-
"ai": "4.2.10",
42+
"ai": "4.3.4",
4443
"bcrypt-ts": "^5.0.2",
4544
"class-variance-authority": "^0.7.0",
4645
"classnames": "^2.5.1",

pnpm-lock.yaml

Lines changed: 53 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)