{"slug": "tanstack-ai-beta-the-switzerland-of-ai-tooling-grows-up", "title": "TanStack AI Beta: The Switzerland of AI Tooling Grows Up", "summary": "TanStack released the Beta of TanStack AI, a framework-agnostic and provider-agnostic AI toolkit, on June 9, 2026. The update delivers stable core APIs, documented protocols, and first-class support for multiple modalities including text, image, audio, video, and real-time chat, all accessible through modular adapters that allow developers to switch AI providers by changing a single import. The release marks the toolkit's evolution from an alpha prototype into a production-ready platform designed to prevent vendor lock-in.", "body_md": "*by Tom Beckenham on Jun 9, 2026.*\n\n**The TanStack team is thrilled to announce the Beta release of TanStack AI, the framework-agnostic, provider-agnostic AI toolkit built for developers who want control over their stack.**\n\nWhen we [shipped the alpha back in December](/blog/tanstack-ai-alpha-your-ai-your-way), we made a promise. No vendor lock-in. No platform to migrate to. No framework dictating how you build. Just honest open source tooling - the Switzerland of AI - that works with the stack you already have.\n\nSix months and a long list of releases later, that promise still holds. But the toolkit behind it has grown up. What was a handful of adapters and an early protocol is now a complete, multi-modal, multi-framework AI platform.\n\nThis is the Beta.\n\nThe alpha was a bet on an architecture. We told you there would be bugs, rough edges, and APIs that might change, and there were. We prototyped through [an ai() function we had to kill](/blog/tanstack-ai-the-ai-function-postmortem), [re-architected the adapters](/blog/tanstack-ai-why-we-split-the-adapters), and [rebuilt the modality story twice](/blog/tanstack-ai-alpha-2) before we were happy.\n\nBeta means the bet paid off. The core APIs are stable. The protocol is documented and versioned. The surface area is broad enough to build a real product on, and the testing infrastructure is strong enough that we trust it. We're no longer asking you to take a chance on a prototype. We're asking you to build with us.\n\nThe biggest change since alpha is breadth. TanStack AI is no longer a text-generation library with extras bolted on. Every major modality is a first-class, typed activity, and every provider ships small, capability-split adapters (openaiText, geminiAudio) instead of one monolith:\n\nHere's what that looks like in practice. A chat endpoint on the server:\n\n``` js\nimport { chat, toServerSentEventsResponse } from '@tanstack/ai'\nimport { openaiText } from '@tanstack/ai-openai'\n\nexport async function POST(request: Request) {\n  const { messages } = await request.json()\n\n  const stream = chat({\n    adapter: openaiText('gpt-5.2'),\n    messages,\n  })\n\n  return toServerSentEventsResponse(stream)\n}\njs\nimport { chat, toServerSentEventsResponse } from '@tanstack/ai'\nimport { openaiText } from '@tanstack/ai-openai'\n\nexport async function POST(request: Request) {\n  const { messages } = await request.json()\n\n  const stream = chat({\n    adapter: openaiText('gpt-5.2'),\n    messages,\n  })\n\n  return toServerSentEventsResponse(stream)\n}\n```\n\nAnd the client, in React:\n\n``` js\nimport { fetchServerSentEvents, useChat } from '@tanstack/ai-react'\n\nfunction Chat() {\n  const { messages, sendMessage, isLoading } = useChat({\n    connection: fetchServerSentEvents('/api/chat'),\n  })\n  // render messages however you like\n}\njs\nimport { fetchServerSentEvents, useChat } from '@tanstack/ai-react'\n\nfunction Chat() {\n  const { messages, sendMessage, isLoading } = useChat({\n    connection: fetchServerSentEvents('/api/chat'),\n  })\n  // render messages however you like\n}\n```\n\nAnd useChat is just the start of the hook family. Every modality gets one — useGeneration for streaming structured output, useGenerateImage, useGenerateAudio, useGenerateSpeech, useTranscription, useSummarize, useGenerateVideo, and useRealtimeChat — all with the same shape, all wired into devtools out of the box.\n\nSwitching providers is the import and the adapter. Nothing else moves:\n\n``` js\n- import { openaiText } from '@tanstack/ai-openai'\n+ import { anthropicText } from '@tanstack/ai-anthropic'\n\n  const stream = chat({\n-   adapter: openaiText('gpt-5.2'),\n+   adapter: anthropicText('claude-opus-4-6'),\n    messages,\n  })\njs\n- import { openaiText } from '@tanstack/ai-openai'\n+ import { anthropicText } from '@tanstack/ai-anthropic'\n\n  const stream = chat({\n-   adapter: openaiText('gpt-5.2'),\n+   adapter: anthropicText('claude-opus-4-6'),\n    messages,\n  })\n```\n\nAnd every other modality follows the same shape — an adapter in, a typed result out:\n\n``` js\nimport { generateAudio } from '@tanstack/ai'\nimport { geminiAudio } from '@tanstack/ai-gemini'\n\nconst result = await generateAudio({\n  adapter: geminiAudio('lyria-3-pro-preview'),\n  prompt: 'A cinematic orchestral piece with a rising string motif',\n})\njs\nimport { generateAudio } from '@tanstack/ai'\nimport { geminiAudio } from '@tanstack/ai-gemini'\n\nconst result = await generateAudio({\n  adapter: geminiAudio('lyria-3-pro-preview'),\n  prompt: 'A cinematic orchestral piece with a rising string motif',\n})\n```\n\nSwitch the modality, switch the provider, and the shape of your code stays the same.\n\nEvery provider has different options. Every model supports different modalities and different native tools. TanStack AI types modelOptions on a per-model basis, so your IDE knows exactly what each model can do.\n\nThat extends to provider tools: native capabilities like web search and code execution that some models support and others silently ignore. As of Beta, [those pairings are gated at the type level](/blog/type-safe-provider-tools-tanstack-ai). Wire an incompatible tool to a model and TypeScript tells you on the line where you pass it, instead of letting it fail quietly in production.\n\nA toy chat endpoint is easy. A production one accretes logging, content guarding, caching, and tracing until it's an unmaintainable monster. Beta ships the pieces that keep that complexity in check:\n\nTanStack AI is TypeScript-first. The toolkit, the per-model type safety, and everything you've seen in this post is built for TypeScript end to end. But the thing that makes it all portable is the protocol: we've documented exactly how the server and client communicate, and in Beta it's stable. Speak it over any transport (HTTP, WebSockets, RPC) through a connection adapter, and our clients work with your backend.\n\n**AG-UI is at its core.** The events flowing across that connection are AG-UI events, not a bespoke format with a compatibility shim on top. Because the standard is built in from the ground up, TanStack AI interoperates with the wider agent ecosystem out of the box: AG-UI-compliant agent frameworks like Microsoft Agent Framework, Agno, LangGraph, CrewAI, Mastra, Pydantic AI, and LlamaIndex can all sit behind a TanStack AI frontend. And because AG-UI is language-agnostic, that backend doesn't have to be TypeScript at all — point your client at an agent server written in Kotlin, Rust, .NET, Python, or anything else that speaks the protocol. It's the same no-lock-in principle, applied to the wire.\n\nOn the client side, vanilla JS, React, Solid, Vue, Svelte, and Preact are all ready.\n\nAI pipelines are notoriously opaque: a missing chunk here, a middleware that didn't fire there, a tool call with mystery arguments. TanStack AI ships two answers:\n\nDebug mode is one line:\n\n``` js\nconst stream = chat({\n  adapter: openaiText('gpt-5.2'),\n  messages,\n  debug: true, // or pick categories: { provider: true, middleware: true, tools: true }\n})\njs\nconst stream = chat({\n  adapter: openaiText('gpt-5.2'),\n  messages,\n  debug: true, // or pick categories: { provider: true, middleware: true, tools: true }\n})\n```\n\nRaw provider chunks, middleware hook inputs and outputs, tool execution, agent-loop iterations — each its own toggle, with a pluggable logger if console isn't where you want it to go.\n\nConfidence at Beta isn't a vibe. It's 265 deterministic end-to-end tests running across 10 LLM providers on every pull request — up from 147 tests and 7 providers when we [wrote about how we test](/blog/how-we-test-tanstack-ai-across-7-providers). Provider behavior drifts, models get deprecated, and APIs change underneath you. Our test suite catches it before you do.\n\nNone of this changes the original deal. There's no service to buy. No platform to migrate to. No vendor lock-in waiting around the corner, and there never will be. TanStack AI is open source, built by the same small, volunteer teams that have shipped framework-agnostic developer tools for years.\n\nAnd if you're weighing it against the Vercel AI SDK, we keep an honest, feature-by-feature [comparison in the docs](/ai/docs/comparison/vercel-ai-sdk) — including the places they're ahead.\n\nWe're still taking a lot on, and we still want your help. Build adapters. File the bug you just hit. Tell us what's missing. Beta is the most stable TanStack AI has ever been, but it's not the finish line. It's the version we're confident enough to ask you to build on.\n\nSo go build something. It starts with one install:\n\n```\npnpm add @tanstack/ai @tanstack/ai-react @tanstack/ai-openai\npnpm add @tanstack/ai @tanstack/ai-react @tanstack/ai-openai\n```\n\nAnd if OpenAI isn't your provider, that last package is the only thing you'd change — ai-anthropic, ai-gemini, ai-groq, ai-ollama, ai-openrouter, take your pick.\n\n[Get started with TanStack AI](/ai), and tell us what you ship.", "url": "https://wpnews.pro/news/tanstack-ai-beta-the-switzerland-of-ai-tooling-grows-up", "canonical_source": "https://tanstack.com/blog/tanstack-ai-beta", "published_at": "2026-06-09 12:00:00+00:00", "updated_at": "2026-06-11 19:41:24.726686+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "ai-startups", "generative-ai", "ai-infrastructure"], "entities": ["TanStack", "TanStack AI", "Tom Beckenham", "Switzerland"], "alternates": {"html": "https://wpnews.pro/news/tanstack-ai-beta-the-switzerland-of-ai-tooling-grows-up", "markdown": "https://wpnews.pro/news/tanstack-ai-beta-the-switzerland-of-ai-tooling-grows-up.md", "text": "https://wpnews.pro/news/tanstack-ai-beta-the-switzerland-of-ai-tooling-grows-up.txt", "jsonld": "https://wpnews.pro/news/tanstack-ai-beta-the-switzerland-of-ai-tooling-grows-up.jsonld"}}