Skip to content

Commit 72712d3

Browse files
YousefEDnperez0111
andauthored
feat: migrate to ai sdk 6 (#2328)
Co-authored-by: Nick the Sick <computers@nickthesick.com>
1 parent ba403cb commit 72712d3

File tree

259 files changed

+888
-2437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+888
-2437
lines changed

docs/content/docs/features/ai/backend-integration.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export async function POST(req: Request) {
3131
const result = streamText({
3232
model: openai("gpt-4.1"), // see https://ai-sdk.dev/docs/foundations/providers-and-models
3333
system: aiDocumentFormats.html.systemPrompt,
34-
messages: convertToModelMessages(injectDocumentStateMessages(messages)),
34+
messages: await convertToModelMessages(
35+
injectDocumentStateMessages(messages),
36+
),
3537
tools: toolDefinitionsToToolSet(toolDefinitions),
3638
toolChoice: "required",
3739
});

docs/content/docs/features/ai/getting-started.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export async function POST(req: Request) {
100100
const result = streamText({
101101
model: openai("gpt-4.1"), // see https://ai-sdk.dev/docs/foundations/providers-and-models
102102
system: aiDocumentFormats.html.systemPrompt,
103-
messages: convertToModelMessages(injectDocumentStateMessages(messages)),
103+
messages: await convertToModelMessages(
104+
injectDocumentStateMessages(messages),
105+
),
104106
tools: toolDefinitionsToToolSet(toolDefinitions),
105107
toolChoice: "required",
106108
});

docs/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
"test": "node validate-links.js"
1515
},
1616
"dependencies": {
17-
"@ai-sdk/anthropic": "^2.0.31",
18-
"@ai-sdk/google": "^2.0.23",
19-
"@ai-sdk/groq": "^2.0.16",
20-
"@ai-sdk/mistral": "^2.0.19",
21-
"@ai-sdk/openai": "^2.0.52",
22-
"@ai-sdk/openai-compatible": "^1.0.22",
17+
"@ai-sdk/anthropic": "^3.0.2",
18+
"@ai-sdk/google": "^3.0.2",
19+
"@ai-sdk/groq": "^3.0.2",
20+
"@ai-sdk/mistral": "^3.0.2",
21+
"@ai-sdk/openai": "^3.0.2",
22+
"@ai-sdk/openai-compatible": "^2.0.4",
2323
"@aws-sdk/client-s3": "^3.609.0",
2424
"@aws-sdk/s3-request-presigner": "^3.609.0",
2525
"@blocknote/code-block": "workspace:*",
@@ -71,7 +71,7 @@
7171
"@vercel/analytics": "^1.5.0",
7272
"@vercel/og": "^0.6.8",
7373
"@y-sweet/react": "^0.6.3",
74-
"ai": "^5.0.102",
74+
"ai": "^6.0.5",
7575
"babel-plugin-react-compiler": "19.1.0-rc.2",
7676
"better-auth": "^1.3.27",
7777
"better-sqlite3": "^11.10.0",

examples/01-basic/03-multi-column/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@blocknote/xl-multi-column": "latest",
2019
"@mantine/core": "^8.3.11",
2120
"@mantine/hooks": "^8.3.11",
2221
"@mantine/utils": "^6.0.22",
2322
"react": "^19.2.1",
24-
"react-dom": "^19.2.1"
23+
"react-dom": "^19.2.1",
24+
"@blocknote/xl-multi-column": "latest"
2525
},
2626
"devDependencies": {
2727
"@types/react": "^19.2.2",

examples/02-backend/03-s3/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
"preview": "vite preview"
1212
},
1313
"dependencies": {
14-
"@aws-sdk/client-s3": "^3.609.0",
15-
"@aws-sdk/s3-request-presigner": "^3.609.0",
1614
"@blocknote/ariakit": "latest",
1715
"@blocknote/core": "latest",
1816
"@blocknote/mantine": "latest",
@@ -22,7 +20,9 @@
2220
"@mantine/hooks": "^8.3.11",
2321
"@mantine/utils": "^6.0.22",
2422
"react": "^19.2.1",
25-
"react-dom": "^19.2.1"
23+
"react-dom": "^19.2.1",
24+
"@aws-sdk/client-s3": "^3.609.0",
25+
"@aws-sdk/s3-request-presigner": "^3.609.0"
2626
},
2727
"devDependencies": {
2828
"@types/react": "^19.2.2",

examples/02-backend/04-rendering-static-documents/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
"@blocknote/core": "latest",
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
18-
"@blocknote/server-util": "latest",
1918
"@blocknote/shadcn": "latest",
2019
"@mantine/core": "^8.3.11",
2120
"@mantine/hooks": "^8.3.11",
2221
"@mantine/utils": "^6.0.22",
2322
"react": "^19.2.1",
24-
"react-dom": "^19.2.1"
23+
"react-dom": "^19.2.1",
24+
"@blocknote/server-util": "latest"
2525
},
2626
"devDependencies": {
2727
"@types/react": "^19.2.2",

examples/03-ui-components/03-formatting-toolbar-block-type-items/.bnexample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"Custom Schemas"
1111
],
1212
"dependencies": {
13-
"@mantine/core": "^8.3.4",
13+
"@mantine/core": "^8.3.11",
1414
"react-icons": "^5.2.1"
1515
}
1616
}

examples/03-ui-components/11-uppy-file-panel/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"@mantine/core": "^8.3.11",
2020
"@mantine/hooks": "^8.3.11",
2121
"@mantine/utils": "^6.0.22",
22+
"react": "^19.2.1",
23+
"react-dom": "^19.2.1",
2224
"@uppy/core": "^3.13.1",
2325
"@uppy/dashboard": "^3.9.1",
2426
"@uppy/drag-drop": "^3.1.1",
@@ -30,8 +32,6 @@
3032
"@uppy/status-bar": "^3.1.1",
3133
"@uppy/webcam": "^3.4.2",
3234
"@uppy/xhr-upload": "^3.4.0",
33-
"react": "^19.2.1",
34-
"react-dom": "^19.2.1",
3535
"react-icons": "^5.2.1"
3636
},
3737
"devDependencies": {

examples/03-ui-components/13-custom-ui/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
"@blocknote/mantine": "latest",
1717
"@blocknote/react": "latest",
1818
"@blocknote/shadcn": "latest",
19-
"@emotion/react": "^11.11.4",
20-
"@emotion/styled": "^11.11.5",
2119
"@mantine/core": "^8.3.11",
2220
"@mantine/hooks": "^8.3.11",
2321
"@mantine/utils": "^6.0.22",
24-
"@mui/icons-material": "^5.16.1",
25-
"@mui/material": "^5.16.1",
2622
"react": "^19.2.1",
27-
"react-dom": "^19.2.1"
23+
"react-dom": "^19.2.1",
24+
"@emotion/react": "^11.11.4",
25+
"@emotion/styled": "^11.11.5",
26+
"@mui/icons-material": "^5.16.1",
27+
"@mui/material": "^5.16.1"
2828
},
2929
"devDependencies": {
3030
"@types/react": "^19.2.2",

examples/04-theming/06-code-block/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"dependencies": {
1414
"@blocknote/ariakit": "latest",
15-
"@blocknote/code-block": "latest",
1615
"@blocknote/core": "latest",
1716
"@blocknote/mantine": "latest",
1817
"@blocknote/react": "latest",
@@ -21,7 +20,8 @@
2120
"@mantine/hooks": "^8.3.11",
2221
"@mantine/utils": "^6.0.22",
2322
"react": "^19.2.1",
24-
"react-dom": "^19.2.1"
23+
"react-dom": "^19.2.1",
24+
"@blocknote/code-block": "latest"
2525
},
2626
"devDependencies": {
2727
"@types/react": "^19.2.2",

0 commit comments

Comments
 (0)