tanstack-ai

Stream AI model outputs with tool calling and Zod-validated structured data.

6|4|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/Montte-erp/montte-nx --skill tanstack-ai-montte-erp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-ai
Source: https://github.com/Montte-erp/montte-nx/tree/main/.agents/skills/tanstack-ai
Command: npx skills add https://github.com/Montte-erp/montte-nx --skill tanstack-ai-montte-erp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It unifies multiple AI providers into a single, type-safe SDK so applications can stream model outputs, call external tools with approval workflows, and produce validated structured results without provider lock-in.

Core Features & Use Cases

  • Provider adapters for OpenAI, Anthropic, Gemini, Ollama and more to enable runtime switching and lightweight bundles.
  • Streaming-first generation, configurable streaming strategies, and Server-Sent Events for real-time UIs.
  • Tool calling with approval workflows, structured output via Zod-to-JSON-schema conversion, multimodal image handling, and React/Solid hooks for chat/completion interfaces.
  • Use Case: Build a real-time financial assistant that streams responses, invokes secure tools for data lookup, and returns typed JSON results for downstream processing.

Quick Start

Use the tanstack-ai SDK to stream model responses, call tools with approval, and return validated structured output using a Zod schema.

Frequently Asked Questions about tanstack-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a streaming AI chat UI without provider lock-in?

To build a streaming AI chat UI without provider lock-in, use a provider-agnostic AI SDK that supports adapter-based switching and Server-Sent Events for real-time response generation across multiple providers.

How do I return structured JSON output from an AI model using Zod?

To return structured JSON output from an AI model using Zod, the SDK converts your Zod schema to a JSON schema, enforcing typed data extraction and validated multimodal results for downstream processing.

Can I call external tools with an approval workflow in a React AI application?

Yes, you can call external tools with an approval workflow in a React AI application using the SDK's agentic tool orchestration and React hooks to manage secure tool invocation and data lookup during streaming generation.

Does this AI SDK support runtime switching between OpenAI, Anthropic, and Ollama?

Yes, this AI SDK supports runtime switching between OpenAI, Anthropic, and Ollama through provider adapters that unify multiple AI providers into a single, type-safe interface for lightweight bundle management.

What is the best way to handle multimodal image inputs in a streaming generation pipeline?

The best way to handle multimodal image inputs in a streaming generation pipeline is using a provider-agnostic AI SDK with native multimodal handling that validates structured outputs alongside streaming text generation.

Does the tanstack-ai SDK offer observability events for production deployments?

Yes, the tanstack-ai SDK offers observability events for production deployments, providing configurable streaming strategies and React/Solid integration to monitor real-time agentic workflows and tool orchestration.