feat: integrate official @ai-sdk/groq provider and fix image sizing constraints in layout components
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
||||
import { createOpenAI } from "@ai-sdk/openai";
|
||||
import { createGroq } from "@ai-sdk/groq";
|
||||
import { convertToModelMessages, streamText, type UIMessage } from "ai";
|
||||
import { createClient } from "@/lib/supabase/server";
|
||||
|
||||
@@ -83,7 +84,7 @@ function getModel(provider: string, apiKey: string, modelName: string) {
|
||||
}
|
||||
|
||||
if (provider === "groq") {
|
||||
return createOpenAI({ apiKey, baseURL: "https://api.groq.com/openai/v1" })(modelName);
|
||||
return createGroq({ apiKey })(modelName);
|
||||
}
|
||||
|
||||
return createOpenAI({ apiKey })(modelName);
|
||||
|
||||
@@ -69,6 +69,7 @@ export function AuthPageShell({
|
||||
width={240}
|
||||
height={64}
|
||||
className="h-16 w-auto object-contain"
|
||||
style={{ width: "auto" }}
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
@@ -155,6 +156,7 @@ export function AuthPageShell({
|
||||
width={180}
|
||||
height={56}
|
||||
className="h-14 w-auto object-contain"
|
||||
style={{ width: "auto" }}
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,7 @@ export function DashboardShell({ children, user }: DashboardShellProps) {
|
||||
width={120}
|
||||
height={32}
|
||||
className="h-8 w-auto object-contain"
|
||||
style={{ width: "auto" }}
|
||||
priority
|
||||
/>
|
||||
</Link>
|
||||
@@ -121,6 +122,7 @@ function AppSidebar({
|
||||
width={160}
|
||||
height={48}
|
||||
className="h-12 w-auto object-contain"
|
||||
style={{ width: "auto" }}
|
||||
priority
|
||||
/>
|
||||
</Link>
|
||||
|
||||
@@ -81,6 +81,7 @@ export function PortalShell({ children, user, progress }: PortalShellProps) {
|
||||
width={120}
|
||||
height={32}
|
||||
className="h-8 w-auto object-contain"
|
||||
style={{ width: "auto" }}
|
||||
priority
|
||||
/>
|
||||
</Link>
|
||||
@@ -127,6 +128,7 @@ function AppSidebar({
|
||||
width={160}
|
||||
height={48}
|
||||
className="h-12 w-auto object-contain"
|
||||
style={{ width: "auto" }}
|
||||
priority
|
||||
/>
|
||||
</Link>
|
||||
|
||||
Generated
+17
@@ -9,6 +9,7 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@ai-sdk/google": "^3.0.80",
|
||||
"@ai-sdk/groq": "^3.0.39",
|
||||
"@ai-sdk/openai": "^3.0.68",
|
||||
"@ai-sdk/react": "^3.0.199",
|
||||
"@base-ui/react": "^1.5.0",
|
||||
@@ -97,6 +98,22 @@
|
||||
"zod": "^3.25.76 || ^4.1.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@ai-sdk/groq": {
|
||||
"version": "3.0.39",
|
||||
"resolved": "https://registry.npmjs.org/@ai-sdk/groq/-/groq-3.0.39.tgz",
|
||||
"integrity": "sha512-BZAr6DjCbzWQ0Qn1/TSsHo/bmCt4JaAMb4A7HCSUZBQCAcOjne/03D0sVjHnQhUC3TpwcmYiv7tHAviK7BluRw==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@ai-sdk/provider": "3.0.10",
|
||||
"@ai-sdk/provider-utils": "4.0.27"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"zod": "^3.25.76 || ^4.1.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@ai-sdk/openai": {
|
||||
"version": "3.0.68",
|
||||
"resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-3.0.68.tgz",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ai-sdk/google": "^3.0.80",
|
||||
"@ai-sdk/groq": "^3.0.39",
|
||||
"@ai-sdk/openai": "^3.0.68",
|
||||
"@ai-sdk/react": "^3.0.199",
|
||||
"@base-ui/react": "^1.5.0",
|
||||
|
||||
Generated
+15
@@ -11,6 +11,9 @@ importers:
|
||||
'@ai-sdk/google':
|
||||
specifier: ^3.0.80
|
||||
version: 3.0.80(zod@4.4.3)
|
||||
'@ai-sdk/groq':
|
||||
specifier: ^3.0.39
|
||||
version: 3.0.39(zod@4.4.3)
|
||||
'@ai-sdk/openai':
|
||||
specifier: ^3.0.68
|
||||
version: 3.0.68(zod@4.4.3)
|
||||
@@ -180,6 +183,12 @@ packages:
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
|
||||
'@ai-sdk/groq@3.0.39':
|
||||
resolution: {integrity: sha512-BZAr6DjCbzWQ0Qn1/TSsHo/bmCt4JaAMb4A7HCSUZBQCAcOjne/03D0sVjHnQhUC3TpwcmYiv7tHAviK7BluRw==}
|
||||
engines: {node: '>=18'}
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
|
||||
'@ai-sdk/openai@3.0.68':
|
||||
resolution: {integrity: sha512-FCs/DPr4M95UyZ/ABHJmTmCEYRCka/4J0Bna0nsd78QCdGIS0X/zhn+fVzB7mZJo7464uOWYUjROx9PGNGOb0w==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -5338,6 +5347,12 @@ snapshots:
|
||||
'@ai-sdk/provider-utils': 4.0.27(zod@4.4.3)
|
||||
zod: 4.4.3
|
||||
|
||||
'@ai-sdk/groq@3.0.39(zod@4.4.3)':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 3.0.10
|
||||
'@ai-sdk/provider-utils': 4.0.27(zod@4.4.3)
|
||||
zod: 4.4.3
|
||||
|
||||
'@ai-sdk/openai@3.0.68(zod@4.4.3)':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 3.0.10
|
||||
|
||||
Reference in New Issue
Block a user