Skip to content

@tanstack/ai@1.7.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 15:19
· 22 commits to main since this release
Immutable release. Only release title and notes can be modified.
878d00e

Minor Changes

  • #2186 1aa7227 - Add the experimental generate3DModel() activity. It turns text, images, or an existing mesh into a 3D model file, and returns the main model URL plus every mesh and texture file. A media prompt can now carry a model3d part, so a step such as retexture can take the mesh of an earlier step. fal3DModel() in @tanstack/ai-fal runs the fal 3D endpoints, and useGenerate3DModel (injectGenerate3DModel in Angular, createGenerate3DModel in Svelte and Remix) streams the job to the UI.

  • #2194 0a84ac2 - Add experimental motion generation. generateMotion() makes skeletal animation files (FBX first) from a text prompt. getMotionJobStatus() polls a job from any request, and cancelMotionJob() asks the provider to stop it. Aborting a stream stops local observation only. falMotion() runs fal Hunyuan Motion (fal-ai/hunyuan-motion, fal-ai/hunyuan-motion/fast).

  • #2184 4288b7a - A server tool can now send result metadata: app data that the UI and middleware see and the model never sees. Call context?.setResultMetadata?.(value) in the tool. Add resultMetadataSchema to the tool definition to type and check the value. The client reads it as a typed part.resultMetadata on the tool-call part, also after a reload with persistence.

    • onAfterToolCall gets info.metadata. A replaceResult or skip decision can set metadata. toolCacheMiddleware keeps the metadata on a cache hit.
    • @tanstack/ai-mcp copies the _meta of an MCP tool result into the result metadata. A tanstack key is dropped.
    • @tanstack/ai-persistence keeps the stored app metadata when a client copy replaces a stored tool message. The 'messages.metadata' conformance check now also tests a tool message with nested app metadata.
    • The server owns the result metadata. chatParamsFromRequest keeps only the tanstack key on the tool rows of a request.
    • Client tools and WebMCP tools throw when they call setResultMetadata.
    • @tanstack/ai-effect accepts tool definitions that have resultMetadataSchema.
    • @tanstack/ai-event-client adds metadata to the tool result event. The devtools show it as "Result metadata" on each tool result.

Patch Changes

  • Updated dependencies [0a84ac2, 4288b7a]:
    • @tanstack/ai-event-client@1.1.0