What if tools, generateObject, etc could just use standard schema directly and not only zod (for supported schema validation libs)?

Oct 9, 2025 路 4:19 PM UTC

12
1
52
Some progress, valibot working with anthropic
1
1
8
Replying to @lgrammel
agree this would be nice buuuut, standard schema doesn't specify json-schema conversion which is what the models want
1
2
i will add support for specific providers that have such a converter. you would still need to install the relevant pkgs as peer deps
4
Replying to @lgrammel
What if generateObject could have tools?
1
1
you can use generateText and output
1
2
Replying to @lgrammel
cant it already? with json-schema?
Replying to @lgrammel
Yes please, simpler types too
2
Replying to @lgrammel
馃挴 this is the way and the vision for standard schema
2
Replying to @lgrammel
No-brainer
1
Replying to @lgrammel
That'd be great
2
Replying to @lgrammel
that would be amazing! I already wrote my own adapter for Effect Schema to JSONSchema tools. Would be great to have this as first class
1
Replying to @lgrammel
Yes please!!
1
Replying to @lgrammel
That would be awesome!
1
Replying to @lgrammel
I did this for one of my packages, if people want to use Zod, that's still fine too! I think it fits in the no lock-in AI SDK way