Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/VercelChat/MessageParts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ToolUIPart,
UIMessage,
isToolOrDynamicToolUIPart,
isToolUIPart,
UIMessagePart,
UIDataTypes,
UITools,
Expand Down Expand Up @@ -105,7 +105,7 @@ export function MessageParts({ message, mode, setMode }: MessagePartsProps) {
}
}

if (isToolOrDynamicToolUIPart(part)) {
if (isToolUIPart(part)) {
const { state } = part as ToolUIPart;
if (state !== "output-available") {
return getToolCallComponent(part as ToolUIPart);
Expand Down
2 changes: 1 addition & 1 deletion lib/ai/generateArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const generateArray = async ({
}): Promise<GenerateArrayResult[]> => {
const result = await generateObject({
model: anthropic(ANTHROPIC_MODEL),
system,
instructions: system,
prompt,
output: "array",
schema: z.object({
Expand Down
2 changes: 1 addition & 1 deletion lib/ai/generateImage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { experimental_generateImage as generate } from "ai";
import { generateImage as generate } from "ai";
import { openai } from "@ai-sdk/openai";
import uploadToArweave from "../arweave/uploadToArweave";

Expand Down
2 changes: 1 addition & 1 deletion lib/ai/generateText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const generateText = async ({
model?: string;
}) => {
const result = await generate({
system,
instructions: system,
model: model || DEFAULT_MODEL,
prompt,
});
Expand Down
14 changes: 0 additions & 14 deletions lib/emails/__tests__/extractSendEmailResults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ describe("extractSendEmailResults", () => {
id: "msg-1",
role: "assistant",
parts: [{ type: "text", text: "Hello" }],
content: "",
createdAt: new Date(),
},
];
const result = extractSendEmailResults(messages);
Expand All @@ -51,8 +49,6 @@ describe("extractSendEmailResults", () => {
id: "msg-1",
role: "assistant",
parts: [createSendEmailPart("output-available", createMcpOutput({ id: "email-123" }))],
content: "",
createdAt: new Date(),
},
];
const result = extractSendEmailResults(messages);
Expand All @@ -65,15 +61,11 @@ describe("extractSendEmailResults", () => {
id: "msg-1",
role: "assistant",
parts: [createSendEmailPart("output-available", createMcpOutput({ id: "email-1" }))],
content: "",
createdAt: new Date(),
},
{
id: "msg-2",
role: "assistant",
parts: [createSendEmailPart("output-available", createMcpOutput({ id: "email-2" }))],
content: "",
createdAt: new Date(),
},
];
const result = extractSendEmailResults(messages);
Expand All @@ -89,8 +81,6 @@ describe("extractSendEmailResults", () => {
id: "msg-1",
role: "assistant",
parts: [createSendEmailPart("pending")],
content: "",
createdAt: new Date(),
},
];
const result = extractSendEmailResults(messages);
Expand All @@ -103,8 +93,6 @@ describe("extractSendEmailResults", () => {
id: "msg-1",
role: "assistant",
parts: [createSendEmailPart("output-available", createMcpOutput({}))],
content: "",
createdAt: new Date(),
},
];
const result = extractSendEmailResults(messages);
Expand All @@ -121,8 +109,6 @@ describe("extractSendEmailResults", () => {
createSendEmailPart("output-available", createMcpOutput({ id: "email-abc" })),
{ type: "text", text: "Email sent!" },
],
content: "",
createdAt: new Date(),
},
];
const result = extractSendEmailResults(messages);
Expand Down
4 changes: 2 additions & 2 deletions lib/emails/extractSendEmailResults.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
getToolOrDynamicToolName,
isToolOrDynamicToolUIPart,
isToolUIPart,
UIMessage,
} from "ai";

Expand All @@ -23,7 +23,7 @@ export function extractSendEmailResults(

for (const message of responseMessages) {
for (const part of message.parts) {
const isDynamicTool = isToolOrDynamicToolUIPart(part);
const isDynamicTool = isToolUIPart(part);
if (!isDynamicTool) continue;
const isSendEmailTool = getToolOrDynamicToolName(part) === "send_email";
if (!isSendEmailTool) continue;
Expand Down
4 changes: 2 additions & 2 deletions lib/generateAndProcessImage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Experimental_GenerateImageResult } from "ai";
import { GenerateImageResult } from "ai";
import Transaction from "arweave/node/lib/transaction";
import { Address, Hash } from "viem";
import { getClientApiBaseUrl } from "@/lib/api/getClientApiBaseUrl";

interface RecoupImageGenerateResponse extends Experimental_GenerateImageResult {
interface RecoupImageGenerateResponse extends GenerateImageResult {
imageUrl: string;
arweaveResult: Transaction;
moment: {
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"update-types": "npx supabase gen types typescript --project-id godremdqwajrwazhbrue --schema public > types/database.types.ts"
},
"dependencies": {
"@ai-sdk/anthropic": "3.0.80",
"@ai-sdk/gateway": "^3.0.96",
"@ai-sdk/google": "3.0.80",
"@ai-sdk/mcp": "^0.0.11",
"@ai-sdk/openai": "3.0.66",
"@ai-sdk/react": "3.0.167",
"@ai-sdk/anthropic": "^4.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update CI to Node 22 with the SDK bump

The AI SDK v7 bump pulls packages that now declare engines: { node: '>=22' } in pnpm-lock.yaml (ai@7.0.2 and the upgraded @ai-sdk/* packages), but the test workflow still runs actions/setup-node with node-version: 20 at .github/workflows/test.yaml:25. Any PR/test run on that workflow now installs and executes these packages outside their supported runtime, so CI can fail or stop matching the runtime this dependency set requires; please update the workflow/package engines to Node 22 alongside the upgrade.

Useful? React with 👍 / 👎.

"@ai-sdk/gateway": "^4.0.2",
"@ai-sdk/google": "^4.0.0",
"@ai-sdk/mcp": "^2.0.0",
"@ai-sdk/openai": "^4.0.0",
"@ai-sdk/react": "^4.0.2",
"@browserbasehq/stagehand": "^2.5.2",
"@coinbase/cdp-sdk": "^1.4.0",
"@coinbase/onchainkit": "^0.38.8",
Expand Down Expand Up @@ -55,7 +55,7 @@
"@uiw/react-heat-map": "^2.3.2",
"@vercel/analytics": "^1.5.0",
"@vercel/blob": "^2.3.2",
"ai": "6.0.165",
"ai": "^7.0.2",
"apify-client": "^2.9.7",
"arweave": "^1.15.7",
"class-variance-authority": "^0.7.1",
Expand Down Expand Up @@ -111,7 +111,7 @@
"viem": "2.x",
"wagmi": "^2.15.4",
"x402-mcp": "^0.1.1",
"zod": "^3.25.0"
"zod": "^3.25.76"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.17",
Expand Down
Loading
Loading