Skip to content

Commit 17a0346

Browse files
fix: scheduling should work (#747)
since we updated to zod v4, the schedule schema was broken. ai sdk's .jsonSchema function doesn't correctly work on tools created with zod v4. The fix, is to use the v3 version of zod for the schedule schema.
1 parent e6dd636 commit 17a0346

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/ten-foxes-arrive.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"agents": patch
3+
---
4+
5+
fix: scheduling should work
6+
7+
since we updated to zod v4, the schedule schema was broken. ai sdk's .jsonSchema function doesn't correctly work on tools created with zod v4. The fix, is to use the v3 version of zod for the schedule schema.

packages/agents/src/schedule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from "zod";
1+
import { z } from "zod/v3";
22

33
/**
44
* Get the schedule prompt for a given event

0 commit comments

Comments
 (0)