feat: integrate official @ai-sdk/groq provider and fix image sizing constraints in layout components

This commit is contained in:
poyrazavsever
2026-06-09 15:14:16 +03:00
parent e01ba6cc18
commit 6e80e556af
7 changed files with 41 additions and 1 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { createGoogleGenerativeAI } from "@ai-sdk/google"; import { createGoogleGenerativeAI } from "@ai-sdk/google";
import { createOpenAI } from "@ai-sdk/openai"; import { createOpenAI } from "@ai-sdk/openai";
import { createGroq } from "@ai-sdk/groq";
import { convertToModelMessages, streamText, type UIMessage } from "ai"; import { convertToModelMessages, streamText, type UIMessage } from "ai";
import { createClient } from "@/lib/supabase/server"; import { createClient } from "@/lib/supabase/server";
@@ -83,7 +84,7 @@ function getModel(provider: string, apiKey: string, modelName: string) {
} }
if (provider === "groq") { if (provider === "groq") {
return createOpenAI({ apiKey, baseURL: "https://api.groq.com/openai/v1" })(modelName); return createGroq({ apiKey })(modelName);
} }
return createOpenAI({ apiKey })(modelName); return createOpenAI({ apiKey })(modelName);
+2
View File
@@ -69,6 +69,7 @@ export function AuthPageShell({
width={240} width={240}
height={64} height={64}
className="h-16 w-auto object-contain" className="h-16 w-auto object-contain"
style={{ width: "auto" }}
priority priority
/> />
</div> </div>
@@ -155,6 +156,7 @@ export function AuthPageShell({
width={180} width={180}
height={56} height={56}
className="h-14 w-auto object-contain" className="h-14 w-auto object-contain"
style={{ width: "auto" }}
priority priority
/> />
</div> </div>
+2
View File
@@ -79,6 +79,7 @@ export function DashboardShell({ children, user }: DashboardShellProps) {
width={120} width={120}
height={32} height={32}
className="h-8 w-auto object-contain" className="h-8 w-auto object-contain"
style={{ width: "auto" }}
priority priority
/> />
</Link> </Link>
@@ -121,6 +122,7 @@ function AppSidebar({
width={160} width={160}
height={48} height={48}
className="h-12 w-auto object-contain" className="h-12 w-auto object-contain"
style={{ width: "auto" }}
priority priority
/> />
</Link> </Link>
+2
View File
@@ -81,6 +81,7 @@ export function PortalShell({ children, user, progress }: PortalShellProps) {
width={120} width={120}
height={32} height={32}
className="h-8 w-auto object-contain" className="h-8 w-auto object-contain"
style={{ width: "auto" }}
priority priority
/> />
</Link> </Link>
@@ -127,6 +128,7 @@ function AppSidebar({
width={160} width={160}
height={48} height={48}
className="h-12 w-auto object-contain" className="h-12 w-auto object-contain"
style={{ width: "auto" }}
priority priority
/> />
</Link> </Link>
+17
View File
@@ -9,6 +9,7 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@ai-sdk/google": "^3.0.80", "@ai-sdk/google": "^3.0.80",
"@ai-sdk/groq": "^3.0.39",
"@ai-sdk/openai": "^3.0.68", "@ai-sdk/openai": "^3.0.68",
"@ai-sdk/react": "^3.0.199", "@ai-sdk/react": "^3.0.199",
"@base-ui/react": "^1.5.0", "@base-ui/react": "^1.5.0",
@@ -97,6 +98,22 @@
"zod": "^3.25.76 || ^4.1.8" "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": { "node_modules/@ai-sdk/openai": {
"version": "3.0.68", "version": "3.0.68",
"resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-3.0.68.tgz", "resolved": "https://registry.npmjs.org/@ai-sdk/openai/-/openai-3.0.68.tgz",
+1
View File
@@ -10,6 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@ai-sdk/google": "^3.0.80", "@ai-sdk/google": "^3.0.80",
"@ai-sdk/groq": "^3.0.39",
"@ai-sdk/openai": "^3.0.68", "@ai-sdk/openai": "^3.0.68",
"@ai-sdk/react": "^3.0.199", "@ai-sdk/react": "^3.0.199",
"@base-ui/react": "^1.5.0", "@base-ui/react": "^1.5.0",
+15
View File
@@ -11,6 +11,9 @@ importers:
'@ai-sdk/google': '@ai-sdk/google':
specifier: ^3.0.80 specifier: ^3.0.80
version: 3.0.80(zod@4.4.3) 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': '@ai-sdk/openai':
specifier: ^3.0.68 specifier: ^3.0.68
version: 3.0.68(zod@4.4.3) version: 3.0.68(zod@4.4.3)
@@ -180,6 +183,12 @@ packages:
peerDependencies: peerDependencies:
zod: ^3.25.76 || ^4.1.8 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': '@ai-sdk/openai@3.0.68':
resolution: {integrity: sha512-FCs/DPr4M95UyZ/ABHJmTmCEYRCka/4J0Bna0nsd78QCdGIS0X/zhn+fVzB7mZJo7464uOWYUjROx9PGNGOb0w==} resolution: {integrity: sha512-FCs/DPr4M95UyZ/ABHJmTmCEYRCka/4J0Bna0nsd78QCdGIS0X/zhn+fVzB7mZJo7464uOWYUjROx9PGNGOb0w==}
engines: {node: '>=18'} engines: {node: '>=18'}
@@ -5338,6 +5347,12 @@ snapshots:
'@ai-sdk/provider-utils': 4.0.27(zod@4.4.3) '@ai-sdk/provider-utils': 4.0.27(zod@4.4.3)
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)': '@ai-sdk/openai@3.0.68(zod@4.4.3)':
dependencies: dependencies:
'@ai-sdk/provider': 3.0.10 '@ai-sdk/provider': 3.0.10