feat: upgrade ai sdk to v5

https://v5.ai-sdk.dev/docs/migration-guides/migration-guide-5-0
This commit is contained in:
javayhu 2025-08-02 00:54:34 +08:00
parent 6d4d316564
commit d0ddc2b1b0
3 changed files with 178 additions and 240 deletions

View File

@ -24,12 +24,12 @@
"knip": "knip"
},
"dependencies": {
"@ai-sdk/deepseek": "^0.2.16",
"@ai-sdk/fal": "^0.1.12",
"@ai-sdk/fireworks": "^0.2.14",
"@ai-sdk/google": "^1.2.22",
"@ai-sdk/openai": "^1.1.13",
"@ai-sdk/replicate": "^0.2.8",
"@ai-sdk/deepseek": "^1.0.0",
"@ai-sdk/fal": "^1.0.0",
"@ai-sdk/fireworks": "^1.0.0",
"@ai-sdk/google": "^2.0.0",
"@ai-sdk/openai": "^2.0.0",
"@ai-sdk/replicate": "^1.0.0",
"@base-ui-components/react": "1.0.0-beta.0",
"@better-fetch/fetch": "^1.1.18",
"@dnd-kit/core": "^6.3.1",
@ -81,7 +81,7 @@
"@vercel/analytics": "^1.5.0",
"@vercel/speed-insights": "^1.2.0",
"@widgetbot/react-embed": "^1.9.0",
"ai": "^4.1.45",
"ai": "^5.0.0",
"better-auth": "^1.1.19",
"canvas-confetti": "^1.9.3",
"class-variance-authority": "^0.7.1",
@ -130,7 +130,7 @@
"use-intl": "^3.26.5",
"use-media": "^1.5.0",
"vaul": "^1.1.2",
"zod": "^3.24.2",
"zod": "^4.0.14",
"zustand": "^5.0.3"
},
"devDependencies": {

400
pnpm-lock.yaml generated
View File

@ -9,23 +9,23 @@ importers:
.:
dependencies:
'@ai-sdk/deepseek':
specifier: ^0.2.16
version: 0.2.16(zod@3.25.64)
specifier: ^1.0.0
version: 1.0.0(zod@4.0.14)
'@ai-sdk/fal':
specifier: ^0.1.12
version: 0.1.12(zod@3.25.64)
specifier: ^1.0.0
version: 1.0.0(zod@4.0.14)
'@ai-sdk/fireworks':
specifier: ^0.2.14
version: 0.2.14(zod@3.25.64)
specifier: ^1.0.0
version: 1.0.0(zod@4.0.14)
'@ai-sdk/google':
specifier: ^1.2.22
version: 1.2.22(zod@3.25.64)
specifier: ^2.0.0
version: 2.0.0(zod@4.0.14)
'@ai-sdk/openai':
specifier: ^1.1.13
version: 1.1.13(zod@3.25.64)
specifier: ^2.0.0
version: 2.0.0(zod@4.0.14)
'@ai-sdk/replicate':
specifier: ^0.2.8
version: 0.2.8(zod@3.25.64)
specifier: ^1.0.0
version: 1.0.0(zod@4.0.14)
'@base-ui-components/react':
specifier: 1.0.0-beta.0
version: 1.0.0-beta.0(@types/react@19.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
@ -180,8 +180,8 @@ importers:
specifier: ^1.9.0
version: 1.9.0(react@19.0.0)
ai:
specifier: ^4.1.45
version: 4.1.45(react@19.0.0)(zod@3.25.64)
specifier: ^5.0.0
version: 5.0.0(zod@4.0.14)
better-auth:
specifier: ^1.1.19
version: 1.1.19
@ -253,7 +253,7 @@ importers:
version: 4.0.0(next@15.2.1(@babel/core@7.24.5)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react@19.0.0)(typescript@5.8.3)
next-safe-action:
specifier: ^7.10.4
version: 7.10.4(next@15.2.1(@babel/core@7.24.5)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(zod@3.25.64)
version: 7.10.4(next@15.2.1(@babel/core@7.24.5)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(zod@4.0.14)
next-themes:
specifier: ^0.4.4
version: 0.4.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
@ -327,8 +327,8 @@ importers:
specifier: ^1.1.2
version: 1.1.2(@types/react-dom@19.0.3(@types/react@19.0.9))(@types/react@19.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
zod:
specifier: ^3.24.2
version: 3.25.64
specifier: ^4.0.14
version: 4.0.14
zustand:
specifier: ^5.0.3
version: 5.0.3(@types/react@19.0.9)(react@19.0.0)(use-sync-external-store@1.5.0(react@19.0.0))
@ -378,97 +378,63 @@ importers:
packages:
'@ai-sdk/deepseek@0.2.16':
resolution: {integrity: sha512-pIlwtjNehCpDr1wqxtSbXshynW4CiwS6S3yAKHzHi73QtmS2Hg9kE1DB0zgENKaZLmbsc4UgigGM6FzuUd4M8Q==}
'@ai-sdk/deepseek@1.0.0':
resolution: {integrity: sha512-5rumr8Gn41MT+mYD6PxPt2vMTh8h4S1KOcJDL1s8+qFaPSqgGal58BzwrVKUS/ycMM61XR6ymX25x09QLAteYw==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/fal@0.1.12':
resolution: {integrity: sha512-Z0pUUR3qwLTj4HXgGJSes5fwjUbSowsMiKbpYKGl6V51sQeUk2EjZctdN4+a+GBuDNCP6Y32Wi8ejM54OMee+w==}
'@ai-sdk/fal@1.0.0':
resolution: {integrity: sha512-iU6U8LXjnrycoGtFKT09o4uDomMyu9W8vCDfJKlrcOvgzOSoG/1D/b/x6wKPbVcVQcsxFEoI9m8YtVtgg1cGsA==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/fireworks@0.2.14':
resolution: {integrity: sha512-0xlh95Y+L9ccc7hwrjdFKi4u8dirx24FLc70ySXA53u1zZP6R1W35TBYGaLzFpTVhhBhDTOca0mE+/EjJihcxw==}
'@ai-sdk/fireworks@1.0.0':
resolution: {integrity: sha512-zc4iGsZ4G4zyTfIvL2bKyFjkz4/j2+wKyYeeNtdz5st1KD4vpAXDjsf0uTeyqXSisrVMrgEBPPkwSRxWQpmPIA==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/google@1.2.22':
resolution: {integrity: sha512-Ppxu3DIieF1G9pyQ5O1Z646GYR0gkC57YdBqXJ82qvCdhEhZHu0TWhmnOoeIWe2olSbuDeoOY+MfJrW8dzS3Hw==}
'@ai-sdk/gateway@1.0.0':
resolution: {integrity: sha512-VEm87DyRx1yIPywbTy8ntoyh4jEDv1rJ88m+2I7zOm08jJI5BhFtAWh0OF6YzZu1Vu4NxhOWO4ssGdsqydDQ3A==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/openai-compatible@0.2.14':
resolution: {integrity: sha512-icjObfMCHKSIbywijaoLdZ1nSnuRnWgMEMLgwoxPJgxsUHMx0aVORnsLUid4SPtdhHI3X2masrt6iaEQLvOSFw==}
'@ai-sdk/google@2.0.0':
resolution: {integrity: sha512-35uWKG+aWm0QClJV/kNhcyR9IVrDkZoI1UlWvUCjwoqbCxj4/L/1LKKbpM3JSRa9u74ghHzBB0UjLHdgcIoanw==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/openai-compatible@0.2.16':
resolution: {integrity: sha512-LkvfcM8slJedRyJa/MiMiaOzcMjV1zNDwzTHEGz7aAsgsQV0maLfmJRi/nuSwf5jmp0EouC+JXXDUj2l94HgQw==}
'@ai-sdk/openai-compatible@1.0.0':
resolution: {integrity: sha512-I5d29iB82ty/e0jqpH4iiWCkFtG1oANzK2WwY3WNF1vWjzqVzvPT+YXR0y43caiq0lIWwMyhJu+bMizmzigrwA==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/openai@1.1.13':
resolution: {integrity: sha512-IdChK1pJTW3NQis02PG/hHTG0gZSyQIMOLPt7f7ES56C0xH2yaKOU1Tp2aib7pZzWGwDlzTOW2h5TtAB8+V6CQ==}
'@ai-sdk/openai@2.0.0':
resolution: {integrity: sha512-G0WY5K81JwGpuX9HEmP2VTdt3N9m43qPnGT4fWkXcpu6Y2B05nnjs8k1r/csCJd8+TkYC6esjBABQYHxdMOejQ==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
zod: ^3.25.76 || ^4
'@ai-sdk/provider-utils@2.1.9':
resolution: {integrity: sha512-NerKjTuuUUs6glJGaentaXEBH52jRM0pR+cRCzc7aWke/K5jYBD6Frv1JYBpcxS7gnnCqSQZR9woiyS+6jrdjw==}
'@ai-sdk/provider-utils@3.0.0':
resolution: {integrity: sha512-BoQZtGcBxkeSH1zK+SRYNDtJPIPpacTeiMZqnG4Rv6xXjEwM0FH4MGs9c+PlhyEWmQCzjRM2HAotEydFhD4dYw==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
peerDependenciesMeta:
zod:
optional: true
zod: ^3.25.76 || ^4
'@ai-sdk/provider-utils@2.2.8':
resolution: {integrity: sha512-fqhG+4sCVv8x7nFzYnFo19ryhAa3w096Kmc3hWxMQfW/TubPOmt3A6tYZhl4mUfQWWQMsuSkLrtjlWuXBVSGQA==}
'@ai-sdk/provider@2.0.0':
resolution: {integrity: sha512-6o7Y2SeO9vFKB8lArHXehNuusnpddKPk7xqL7T2/b+OvXMRIXUO1rR4wcv1hAFUAT9avGZshty3Wlua/XA7TvA==}
engines: {node: '>=18'}
'@ai-sdk/replicate@1.0.0':
resolution: {integrity: sha512-whCL8u2aKXJcD8LmxK9oZOL3I/XkLgY7PqNsqLzemP5AlchjZTn8LLvwx5LBc2W3nkEXOz4Kt1oJGv1rQRxbnA==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.23.8
'@ai-sdk/provider@1.0.8':
resolution: {integrity: sha512-f9jSYwKMdXvm44Dmab1vUBnfCDSFfI5rOtvV1W9oKB7WYHR5dGvCC6x68Mk3NUfrdmNoMVHGoh6JT9HCVMlMow==}
engines: {node: '>=18'}
'@ai-sdk/provider@1.1.3':
resolution: {integrity: sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==}
engines: {node: '>=18'}
'@ai-sdk/react@1.1.17':
resolution: {integrity: sha512-NAuEflFvjw1uh1AOmpyi7rBF4xasWsiWUb86JQ8ScjDGxoGDYEdBnaHOxUpooLna0dGNbSPkvDMnVRhoLKoxPQ==}
engines: {node: '>=18'}
peerDependencies:
react: ^18 || ^19 || ^19.0.0-rc
zod: ^3.0.0
peerDependenciesMeta:
react:
optional: true
zod:
optional: true
'@ai-sdk/replicate@0.2.8':
resolution: {integrity: sha512-l9t4+RzbAn8osstkbWs6l++Nava+4LO4dsaddnE0GQM5E0BEIgMTJ14hoyfE02Ep0rJZ0M2HlXGqv5heW47P8A==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
'@ai-sdk/ui-utils@1.1.15':
resolution: {integrity: sha512-NsV/3CMmjc4m53snzRdtZM6teTQUXIKi8u0Kf7GBruSzaMSuZ4DWaAAlUshhR3p2FpZgtsogW+vYG1/rXsGu+Q==}
engines: {node: '>=18'}
peerDependencies:
zod: ^3.0.0
peerDependenciesMeta:
zod:
optional: true
zod: ^3.25.76 || ^4
'@alloc/quick-lru@5.2.0':
resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
@ -3999,9 +3965,6 @@ packages:
'@types/debug@4.1.12':
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
'@types/diff-match-patch@1.0.36':
resolution: {integrity: sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg==}
'@types/estree-jsx@1.0.5':
resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
@ -4029,6 +3992,9 @@ packages:
'@types/node@20.19.0':
resolution: {integrity: sha512-hfrc+1tud1xcdVTABC2JiomZJEklMcXYNTVtZLAeqTVWD+qL5jkHKT+1lOtqDdGxt+mB53DTtiz673vfjU8D1Q==}
'@types/node@20.19.9':
resolution: {integrity: sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==}
'@types/node@22.16.3':
resolution: {integrity: sha512-sr4Xz74KOUeYadexo1r8imhRtlVXcs+j3XK3TcoiYk7B1t3YRVJgtaD3cwX73NYb71pmVuMLNRhJ9XKdoDB74g==}
@ -4147,17 +4113,11 @@ packages:
resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==}
engines: {node: '>= 14'}
ai@4.1.45:
resolution: {integrity: sha512-nQkxQ2zCD+O/h8zJ+PxmBv9coyMaG1uP9kGJvhNaGAA25hbZRQWL0NbTsSJ/QMOUraXKLa+6fBm3VF1NkJK9Kg==}
ai@5.0.0:
resolution: {integrity: sha512-F4jOhOSeiZD8lXpF4l1hRqyM1jbqoLKGVZNxAP467wmQCsWUtElMa3Ki5PrDMq6qvUNC3deUKfERDAsfj7IDlg==}
engines: {node: '>=18'}
peerDependencies:
react: ^18 || ^19 || ^19.0.0-rc
zod: ^3.0.0
peerDependenciesMeta:
react:
optional: true
zod:
optional: true
zod: ^3.25.76 || ^4
ansi-regex@4.1.1:
resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==}
@ -4274,10 +4234,6 @@ packages:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
chalk@5.4.1:
resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==}
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
character-entities-html4@2.1.0:
resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
@ -4505,9 +4461,6 @@ packages:
devlop@1.1.0:
resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==}
diff-match-patch@1.0.5:
resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==}
dom-helpers@5.2.1:
resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==}
@ -4756,9 +4709,9 @@ packages:
eventemitter3@4.0.7:
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
eventsource-parser@3.0.0:
resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==}
engines: {node: '>=18.0.0'}
eventsource-parser@3.0.3:
resolution: {integrity: sha512-nVpZkTMM9rF6AQ9gPJpFsNAMt48wIzB5TQgiTLdHiuO8XEDhUgZEhqKlZWXbIzo9VmJ/HvysHqEaVeD5v9TPvA==}
engines: {node: '>=20.0.0'}
extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
@ -5161,11 +5114,6 @@ packages:
engines: {node: '>=6'}
hasBin: true
jsondiffpatch@0.6.0:
resolution: {integrity: sha512-3QItJOXp2AP1uv7waBkao5nCvhEv+QmJAd38Ybq7wNI74Q+BBmnLn4EDKz6yI9xGAIQoUF87qHt+kc1IVxB4zQ==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
knip@5.61.2:
resolution: {integrity: sha512-ZBv37zDvZj0/Xwk0e93xSjM3+5bjxgqJ0PH2GlB5tnWV0ktXtmatWLm+dLRUCT/vpO3SdGz2nNAfvVhuItUNcQ==}
engines: {node: '>=18.18.0'}
@ -5695,11 +5643,11 @@ packages:
peberminta@0.9.0:
resolution: {integrity: sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==}
pg-cloudflare@1.2.5:
resolution: {integrity: sha512-OOX22Vt0vOSRrdoUPKJ8Wi2OpE/o/h9T8X1s4qSkCedbNah9ei2W2765be8iMVxQUsvgT7zIAT2eIa9fs5+vtg==}
pg-cloudflare@1.2.7:
resolution: {integrity: sha512-YgCtzMH0ptvZJslLM1ffsY4EuGaU0cx4XSdXLRFae8bPP4dS5xL1tNB3k2o/N64cHJpwU7dxKli/nZ2lUa5fLg==}
pg-connection-string@2.8.5:
resolution: {integrity: sha512-Ni8FuZ8yAF+sWZzojvtLE2b03cqjO5jNULcHFfM9ZZ0/JXrgom5pBREbtnAw7oxsxJqHw9Nz/XWORUEL3/IFow==}
pg-connection-string@2.9.1:
resolution: {integrity: sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==}
pg-int8@1.0.1:
resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==}
@ -5712,11 +5660,14 @@ packages:
resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==}
engines: {node: '>=4'}
pg-pool@3.9.6:
resolution: {integrity: sha512-rFen0G7adh1YmgvrmE5IPIqbb+IgEzENUm+tzm6MLLDSlPRoZVhzU1WdML9PV2W5GOdRA9qBKURlbt1OsXOsPw==}
pg-pool@3.10.1:
resolution: {integrity: sha512-Tu8jMlcX+9d8+QVzKIvM/uJtp07PKr82IUOYEphaWcoBhIYkoHpLXN3qO59nAI11ripznDsEzEv8nUxBVWajGg==}
peerDependencies:
pg: '>=8.0'
pg-protocol@1.10.3:
resolution: {integrity: sha512-6DIBgBQaTKDJyxnXaLiLR8wBpQQcGWuAESkRBX/t6OwA8YsqP+iVSiond2EDy6Y/dsGk8rh/jtax3js5NeV7JQ==}
pg-protocol@1.7.1:
resolution: {integrity: sha512-gjTHWGYWsEgy9MsY0Gp6ZJxV24IjDqdpTW7Eh0x+WfJLFsm/TJx1MzL6T0D88mBvkpxotCQ6TwW6N+Kko7lhgQ==}
@ -5731,6 +5682,10 @@ packages:
resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==}
engines: {node: '>=10'}
pg-types@4.1.0:
resolution: {integrity: sha512-o2XFanIMy/3+mThw69O8d4n1E5zsLhdO+OPqswezu7Z5ekP4hYDqlDjlmOpYMbzY2Br0ufCwJLdDIXeNVwcWFg==}
engines: {node: '>=10'}
pg@8.15.6:
resolution: {integrity: sha512-yvao7YI3GdmmrslNVsZgx9PfntfWrnXwtR+K/DjI0I/sTKif4Z623um+sjVZ1hk5670B+ODjvHDAckKdjmPTsg==}
engines: {node: '>= 8.0.0'}
@ -5777,6 +5732,10 @@ packages:
resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==}
engines: {node: '>=12'}
postgres-array@3.0.4:
resolution: {integrity: sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==}
engines: {node: '>=12'}
postgres-bytea@1.0.0:
resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==}
engines: {node: '>=0.10.0'}
@ -6095,9 +6054,6 @@ packages:
scroll-into-view-if-needed@3.1.0:
resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==}
secure-json-parse@2.7.0:
resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==}
selderee@0.11.0:
resolution: {integrity: sha512-5TF+l7p4+OsnP8BCCvSyZiSPc4x4//p5uPwK8TCnVPJYRmU2aYKMpOXvw8zM5a5JvuuCGN1jmsMwuU2W02ukfA==}
@ -6308,10 +6264,6 @@ packages:
third-party-capital@1.0.20:
resolution: {integrity: sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==}
throttleit@2.1.0:
resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==}
engines: {node: '>=18'}
tiny-invariant@1.3.3:
resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}
@ -6526,6 +6478,11 @@ packages:
peerDependencies:
zod: ^3.24.1
zod-to-json-schema@3.24.6:
resolution: {integrity: sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==}
peerDependencies:
zod: ^3.24.1
zod-validation-error@3.5.2:
resolution: {integrity: sha512-mdi7YOLtram5dzJ5aDtm1AG9+mxRma1iaMrZdYIpFO7epdKBUwLHIxTF8CPDeCQ828zAXYtizrKlEJAtzgfgrw==}
engines: {node: '>=18.0.0'}
@ -6538,6 +6495,9 @@ packages:
zod@3.25.64:
resolution: {integrity: sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g==}
zod@4.0.14:
resolution: {integrity: sha512-nGFJTnJN6cM2v9kXL+SOBq3AtjQby3Mv5ySGFof5UGRHrRioSJ5iG680cYNjE/yWk671nROcpPj4hAS8nyLhSw==}
zustand@5.0.3:
resolution: {integrity: sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==}
engines: {node: '>=12.20.0'}
@ -6561,97 +6521,67 @@ packages:
snapshots:
'@ai-sdk/deepseek@0.2.16(zod@3.25.64)':
'@ai-sdk/deepseek@1.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/openai-compatible': 0.2.16(zod@3.25.64)
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/openai-compatible': 1.0.0(zod@4.0.14)
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/fal@0.1.12(zod@3.25.64)':
'@ai-sdk/fal@1.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/fireworks@0.2.14(zod@3.25.64)':
'@ai-sdk/fireworks@1.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/openai-compatible': 0.2.14(zod@3.25.64)
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/openai-compatible': 1.0.0(zod@4.0.14)
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/google@1.2.22(zod@3.25.64)':
'@ai-sdk/gateway@1.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/openai-compatible@0.2.14(zod@3.25.64)':
'@ai-sdk/google@2.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/openai-compatible@0.2.16(zod@3.25.64)':
'@ai-sdk/openai-compatible@1.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/openai@1.1.13(zod@3.25.64)':
'@ai-sdk/openai@2.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/provider': 1.0.8
'@ai-sdk/provider-utils': 2.1.9(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@ai-sdk/provider-utils@2.1.9(zod@3.25.64)':
'@ai-sdk/provider-utils@3.0.0(zod@4.0.14)':
dependencies:
'@ai-sdk/provider': 1.0.8
eventsource-parser: 3.0.0
nanoid: 3.3.8
secure-json-parse: 2.7.0
optionalDependencies:
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@standard-schema/spec': 1.0.0
eventsource-parser: 3.0.3
zod: 4.0.14
zod-to-json-schema: 3.24.6(zod@4.0.14)
'@ai-sdk/provider-utils@2.2.8(zod@3.25.64)':
dependencies:
'@ai-sdk/provider': 1.1.3
nanoid: 3.3.8
secure-json-parse: 2.7.0
zod: 3.25.64
'@ai-sdk/provider@1.0.8':
'@ai-sdk/provider@2.0.0':
dependencies:
json-schema: 0.4.0
'@ai-sdk/provider@1.1.3':
'@ai-sdk/replicate@1.0.0(zod@4.0.14)':
dependencies:
json-schema: 0.4.0
'@ai-sdk/react@1.1.17(react@19.0.0)(zod@3.25.64)':
dependencies:
'@ai-sdk/provider-utils': 2.1.9(zod@3.25.64)
'@ai-sdk/ui-utils': 1.1.15(zod@3.25.64)
swr: 2.3.2(react@19.0.0)
throttleit: 2.1.0
optionalDependencies:
react: 19.0.0
zod: 3.25.64
'@ai-sdk/replicate@0.2.8(zod@3.25.64)':
dependencies:
'@ai-sdk/provider': 1.1.3
'@ai-sdk/provider-utils': 2.2.8(zod@3.25.64)
zod: 3.25.64
'@ai-sdk/ui-utils@1.1.15(zod@3.25.64)':
dependencies:
'@ai-sdk/provider': 1.0.8
'@ai-sdk/provider-utils': 2.1.9(zod@3.25.64)
zod-to-json-schema: 3.24.2(zod@3.25.64)
optionalDependencies:
zod: 3.25.64
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
zod: 4.0.14
'@alloc/quick-lru@5.2.0': {}
@ -10145,8 +10075,6 @@ snapshots:
dependencies:
'@types/ms': 2.1.0
'@types/diff-match-patch@1.0.36': {}
'@types/estree-jsx@1.0.5':
dependencies:
'@types/estree': 1.0.6
@ -10177,6 +10105,11 @@ snapshots:
dependencies:
undici-types: 6.21.0
'@types/node@20.19.9':
dependencies:
undici-types: 6.21.0
optional: true
'@types/node@22.16.3':
dependencies:
undici-types: 6.21.0
@ -10193,9 +10126,9 @@ snapshots:
'@types/pg@8.11.6':
dependencies:
'@types/node': 20.19.0
pg-protocol: 1.9.5
pg-types: 4.0.2
'@types/node': 20.19.9
pg-protocol: 1.10.3
pg-types: 4.1.0
optional: true
'@types/pg@8.6.1':
@ -10260,17 +10193,13 @@ snapshots:
agent-base@7.1.3: {}
ai@4.1.45(react@19.0.0)(zod@3.25.64):
ai@5.0.0(zod@4.0.14):
dependencies:
'@ai-sdk/provider': 1.0.8
'@ai-sdk/provider-utils': 2.1.9(zod@3.25.64)
'@ai-sdk/react': 1.1.17(react@19.0.0)(zod@3.25.64)
'@ai-sdk/ui-utils': 1.1.15(zod@3.25.64)
'@ai-sdk/gateway': 1.0.0(zod@4.0.14)
'@ai-sdk/provider': 2.0.0
'@ai-sdk/provider-utils': 3.0.0(zod@4.0.14)
'@opentelemetry/api': 1.9.0
jsondiffpatch: 0.6.0
optionalDependencies:
react: 19.0.0
zod: 3.25.64
zod: 4.0.14
ansi-regex@4.1.1: {}
@ -10400,8 +10329,6 @@ snapshots:
ansi-styles: 4.3.0
supports-color: 7.2.0
chalk@5.4.1: {}
character-entities-html4@2.1.0: {}
character-entities-legacy@3.0.0: {}
@ -10595,8 +10522,6 @@ snapshots:
dependencies:
dequal: 2.0.3
diff-match-patch@1.0.5: {}
dom-helpers@5.2.1:
dependencies:
'@babel/runtime': 7.26.10
@ -10911,7 +10836,7 @@ snapshots:
eventemitter3@4.0.7: {}
eventsource-parser@3.0.0: {}
eventsource-parser@3.0.3: {}
extend@3.0.2: {}
@ -11400,12 +11325,6 @@ snapshots:
json5@2.2.3: {}
jsondiffpatch@0.6.0:
dependencies:
'@types/diff-match-patch': 1.0.36
chalk: 5.4.1
diff-match-patch: 1.0.5
knip@5.61.2(@types/node@20.19.0)(typescript@5.8.3):
dependencies:
'@nodelib/fs.walk': 1.2.8
@ -12018,13 +11937,13 @@ snapshots:
optionalDependencies:
typescript: 5.8.3
next-safe-action@7.10.4(next@15.2.1(@babel/core@7.24.5)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(zod@3.25.64):
next-safe-action@7.10.4(next@15.2.1(@babel/core@7.24.5)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(zod@4.0.14):
dependencies:
next: 15.2.1(@babel/core@7.24.5)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
react: 19.0.0
react-dom: 19.0.0(react@19.0.0)
optionalDependencies:
zod: 3.25.64
zod: 4.0.14
next-themes@0.4.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0):
dependencies:
@ -12174,10 +12093,10 @@ snapshots:
peberminta@0.9.0: {}
pg-cloudflare@1.2.5:
pg-cloudflare@1.2.7:
optional: true
pg-connection-string@2.8.5:
pg-connection-string@2.9.1:
optional: true
pg-int8@1.0.1: {}
@ -12190,11 +12109,14 @@ snapshots:
pg-numeric@1.0.2: {}
pg-pool@3.9.6(pg@8.15.6(pg-native@3.4.5)):
pg-pool@3.10.1(pg@8.15.6(pg-native@3.4.5)):
dependencies:
pg: 8.15.6(pg-native@3.4.5)
optional: true
pg-protocol@1.10.3:
optional: true
pg-protocol@1.7.1: {}
pg-protocol@1.9.5: {}
@ -12217,15 +12139,26 @@ snapshots:
postgres-interval: 3.0.0
postgres-range: 1.1.4
pg-types@4.1.0:
dependencies:
pg-int8: 1.0.1
pg-numeric: 1.0.2
postgres-array: 3.0.4
postgres-bytea: 3.0.0
postgres-date: 2.1.0
postgres-interval: 3.0.0
postgres-range: 1.1.4
optional: true
pg@8.15.6(pg-native@3.4.5):
dependencies:
pg-connection-string: 2.8.5
pg-pool: 3.9.6(pg@8.15.6(pg-native@3.4.5))
pg-protocol: 1.9.5
pg-connection-string: 2.9.1
pg-pool: 3.10.1(pg@8.15.6(pg-native@3.4.5))
pg-protocol: 1.10.3
pg-types: 2.2.0
pgpass: 1.0.5
optionalDependencies:
pg-cloudflare: 1.2.5
pg-cloudflare: 1.2.7
pg-native: 3.4.5
optional: true
@ -12267,6 +12200,9 @@ snapshots:
postgres-array@3.0.2: {}
postgres-array@3.0.4:
optional: true
postgres-bytea@1.0.0: {}
postgres-bytea@3.0.0:
@ -12712,8 +12648,6 @@ snapshots:
dependencies:
compute-scroll-into-view: 3.1.1
secure-json-parse@2.7.0: {}
selderee@0.11.0:
dependencies:
parseley: 0.12.1
@ -12964,8 +12898,6 @@ snapshots:
third-party-capital@1.0.20: {}
throttleit@2.1.0: {}
tiny-invariant@1.3.3: {}
tinyexec@1.0.1: {}
@ -13186,6 +13118,10 @@ snapshots:
dependencies:
zod: 3.25.64
zod-to-json-schema@3.24.6(zod@4.0.14):
dependencies:
zod: 4.0.14
zod-validation-error@3.5.2(zod@3.25.64):
dependencies:
zod: 3.25.64
@ -13194,6 +13130,8 @@ snapshots:
zod@3.25.64: {}
zod@4.0.14: {}
zustand@5.0.3(@types/react@19.0.9)(react@19.0.0)(use-sync-external-store@1.5.0(react@19.0.0)):
optionalDependencies:
'@types/react': 19.0.9

View File

@ -254,7 +254,7 @@ async function analyzeContent(
- Ensure the title and description are meaningful and based on the actual content
`,
temperature,
maxTokens,
maxOutputTokens: maxTokens,
});
return {