AI-Readiness Scorecard
zod · v4.4.3

Zod 4 is 90% ready for AI coding agents.

Claude Opus 4.8 has caught up to Zod 4 — it even writes the new two-argument z.record() and modern IP validation. The one v3 habit it can't shake: the removed required_error option for custom messages.

90/100
Agent-readiness
9 compile clean1 fails type-check
Model: claude-opus-4-8Tasks: 10 Method: tsc against real installed packageRun: 2026-07-18
Prisma 7
80
3 setup APIs on v6 →
Vercel AI SDK 7
90
tool API →
Zod 4
90
the error-message option
The gap

The one thing the agent gets wrong

Real code the model generated, verified by the compiler against the installed zod v4.

Custom message for a required fieldTS2769
Agent wrote (Zod 3)
z.string({
  required_error: "Name is required",
})
Zod 4
z.string({
  error: "Name is required",
})
error TS2769: No overload matches this call. 'required_error' does not exist in the argument type.
Why: Zod 4 unified error customization. The separate required_error / invalid_type_error / message options were replaced by a single error (a string or a function). The old keys no longer type-check.
Genuinely caught up

What it gets right — 9 of 10

It even nailed the sharp v4 renames.

Beyond the basics, the model wrote the two-argument z.record(z.string(), z.number()) (v3's one-arg form is gone) and modern IP validation — the exact changes you'd expect it to still miss. It didn't. The only residual is the error-message option.

z.object.parse / .safeParsez.infer z.array + z.enum.optional().default().email() z.record(a, b) — new 2-argIPv4 validation
Three scores, one pattern

Readiness tracks the drift window

The score reflects how recently your SDK changed, not how good the model is. Zod 4 and the Vercel AI SDK shipped their breaking changes in 2025 — the model has largely absorbed both (90/100 each, one residual gap). Prisma 7 is newer, and the same model still writes its old v6 setup: 80/100.

Right after a major, the gap is wide; as models retrain, it narrows — then re-opens on your next major and shifts on every model release. A moving number worth watching, which is what SDKProof tracks.

No opinions — just the compiler

How this was measured

10 realistic Zod tasks → generated by claude-opus-4-8 → each written into a project with the real installed zod v4.4.3 and type-checked with tsc --noEmit.
A task passes only if it compiles clean. Prompts name the building blocks (z.object, z.record, …) but never the signatures — so this measures what the model reaches for. Failures are the compiler's own diagnostics. Reproducible: pinned versions, pinned model.

Is your SDK ready for AI agents?

Right after a major release, agents keep shipping your old API. SDKProof scores it, tracks it across model releases, and tells you exactly what to fix.

See it on GitHub →
early project · scorecards are independent analysis