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.