ta
TanStack
GitHub
ai
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
ai
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
refactor/ai-drop-zod-dependency
616d7052 refactor(ai): remove zod from the dependency graph Bump `@ag-ui/core` to `0.1.1-canary.beta.0`, the only published version that declares zod as an optional peer rather than a runtime dependency. Every prior version (including `0.0.57`) hard-depends on zod, so it was installed transitively for every `@tanstack/ai` consumer. `chatParamsFromRequest` / `chatParamsFromRequestBody` were the sole zod consumers here — they validated request bodies with AG-UI's `RunAgentInputSchema`, which the canary moved to the `@ag-ui/core/schemas` subpath. Since this module is re-exported from the package root, importing that subpath (statically or lazily) would keep zod on the critical path for anyone calling `import { chat } from '@tanstack/ai'`. Instead both helpers now validate the same `RunAgentInput` contract structurally, transcribed from the upstream schema definitions: `tools`/`context` stay required arrays, `parentRunId` / `state` / `forwardedProps` / `resume` optional, and messages discriminate on `role` per variant. `@tanstack/ai` now ships with no schema-validation runtime at all and neither requires nor suggests zod. zod remains fully supported for defining tools. No API change: both helpers keep their signatures, still reject non-conforming bodies with `AGUIError` (`chatParamsFromRequest` still throws a 400 `Response`), and still carry TanStack's canonical `parts` through on messages. Validation failures now name the offending field (`messages[1].content must be a string`) instead of dumping zod issues. Two deliberate behavior notes: - `forwardedProps` is now validated as an object. Upstream typed it `z.any()`, so a non-object previously passed through and violated the declared `Record<string, unknown>` return type. - Unknown fields on individual messages now pass through instead of being stripped by `z.object`, which is more forward-compatible with newer AG-UI message fields. Unknown top-level fields are still dropped by construction, so the `cursor` behavior is unchanged. Also fixes a middleware snippet in the Vercel AI SDK comparison doc. The canary replaced zod-inferred event types with hand-written interfaces, so `'delta' in chunk` no longer filters the `AGUIEvent` union — every member is retained and intersected with `Record<'delta', unknown>`, typing `delta` as `unknown`. The snippet now discriminates on `type`, the real discriminant, which narrows `delta` to `string` with no non-null assertion.
by Alem Tuzlak
A
Succeeded
refactor/ai-drop-zod-dependency
616d7052 Merge 988769877e42c4d35a697686807875030ab5b088 into 826cfed738ec19e8f416bc5373ad50de0c1824cc
by Alem Tuzlak
A
Previous page
Previous
Next
Next page