Skip to content

ci: Version Packages#565

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

ci: Version Packages#565
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@tanstack/[email protected]

Patch Changes

  • fix(ai): infer Zod-typed outputSchema instead of collapsing to unknown (#563)

    chat({ outputSchema: zodSchema }) previously returned Promise<unknown> (and
    StructuredOutputCompleteEvent<T> resolved with T = unknown) because
    InferSchemaType only matched StandardJSONSchemaV1. Zod's core $ZodType
    declares ~standard as StandardSchemaV1.Props — without a type-level
    jsonSchema converter — so Zod schemas (and any other library that exposes
    only the Standard Schema validator surface to the type checker) fell through
    to unknown, forcing callers to either cast or run a redundant schema.parse().

    SchemaInput now also accepts StandardSchemaV1<any, any>, and
    InferSchemaType recovers the input type from that branch when the
    JSON-schema branch doesn't match. The runtime path is unchanged for Zod /
    ArkType / Valibot (convertSchemaToJsonSchema still detects the runtime
    ~standard.jsonSchema converter); only the static types are widened.

    convertSchemaToJsonSchema now throws an actionable error when given a
    Standard Schema validator that lacks a JSON-schema converter, instead of
    silently shipping the raw { '~standard': ... } object to the LLM provider.

    Closes chat(): InferSchemaType<z.ZodType<T>> resolves to unknown — forces .parse() round trip or cast #562

  • Updated dependencies []:

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

[email protected]

Patch Changes

@tanstack/[email protected]

Patch Changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chat(): InferSchemaType<z.ZodType<T>> resolves to unknown — forces .parse() round trip or cast

0 participants