[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[AI SDK](/c/ai-sdk/62)

# Deployment error with AISDK library

150 views · 2 likes · 3 posts


Simon (@unlok-simon) · 2025-07-10

I am trying to deploy some minor changes to an app which uses the AISDK but i'm getting build errors:

Attempted import error: 'ZodFirstPartyTypeKind' is not exported from 'zod' (imported as 'ZodFirstPartyTypeKind').

According to the build logs this is coming from the AISDK library and I can't seem to fix it.

Anyone else seeing this? Only started happening today.


Jacob Paris (@jacobparis) · 2025-07-10 · ♥ 1

We're working on a fix for this

Zod 4 was published yesterday and v0 switched automatically to using it because it uses `"zod": "latest"`

But the AI SDK has a dependency on `zod-to-json-schema` which has not updated to Zod 4 yet and is incompatible, so you get this error

The fastest unblock would be to download/git sync your code and manually downgrade zod, then deploy through CLI/Vercel 

We'll get this fixed on our end as soon as we can


Simon (@unlok-simon) · 2025-07-28 · ♥ 1

Thanks Jacob.

It ended up being the MCP SDK forcing the Zod 4 dependency.  Luckily we didn't really need it for what we were doing so we able to find another way and were able to remove it which fied our deployment issue.