惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
V
Visual Studio Blog
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
C
Check Point Blog
D
Docker
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
博客园 - 叶小钗
博客园 - 聂微东
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
腾讯CDC
S
SegmentFault 最新的问题
博客园 - 【当耐特】

TanStack Blog

TanStack + Vercel Partnership | TanStack Blog TanStack AI Enters the RC Phase | TanStack Blog Inside a TanStack Router Navigation | TanStack Blog Form v2 is here: All you need to know about the alpha | TanStack Blog Announcing TanStack Table V9 | TanStack Blog TanStack Has a New Look | TanStack Blog Introducing TanStack Markdown and TanStack Highlight | TanStack Blog We Removed React Server Components from TanStack.com | TanStack Blog We Stopped Using RSC on TanStack.com | TanStack Blog Inside TanStack Table V9 Reactivity | TanStack Blog Run Any Coding Agent in a Sandbox, With One chat() Call | TanStack Blog TanStack Start and TanStack AI Win 2026 Open Source Awards | TanStack Blog How an Underrated Refactor Saved 90% Memory Usage | TanStack Blog TypeScript Performance in TanStack Table V9 | TanStack Blog TanStack AI Beta: The Switzerland of AI Tooling Grows Up | TanStack Blog TanStack Table V9: Taking Form | TanStack Blog TanStack AI: Your MCP, your way | TanStack Blog TanStack Start Adds First-Class Rsbuild Support | TanStack Blog Introducing Experimental Workflows and Orchestrators in TanStack AI | TanStack Blog Chat UIs Are Lists Until They Aren't | TanStack Blog Structured Output That Remembers Across Turns | TanStack Blog TanStack Virtual just got a lot faster, and finally handles iOS | TanStack Blog TanStack AI now fully speaks AG-UI | TanStack Blog Stop Waiting on JSON: Stream Structured Output with One Schema | TanStack Blog Hardening TanStack After the npm Compromise | TanStack Blog Postmortem: TanStack npm supply-chain compromise | TanStack Blog Who Owns the Tree? RSC as a Protocol, Not an Architecture | TanStack Blog TanStack AI Just Learned to Compose Music | TanStack Blog Your AI Tool Calls Should Fail at Compile Time, Not in Production | TanStack Blog One Flag, Every Chunk: Debug Logging Lands in TanStack AI | TanStack Blog
TanStack AI: Why We Split the Adapters | TanStack Blog
Alem Tuzlak · 2026-01-02 · via TanStack Blog

by Alem Tuzlak on Jan 2, 2026.

TanStack AI: Why We Split the Adapters

With the latest release we brought a major architectural change to how we do adapters. Instead of one monolithic adapter that does everything, we split into smaller adapters. Each in charge of a single functionality.

Here's why.

We need to support:

  • Text generation
  • Audio generation
  • Video generation
  • Text-to-speech
  • Transcription
  • Summarization
  • And more to come

We're a small team. We don't have infinite funds or a lot of people to help iterate and add functionalities. We can't afford mistakes that slow us down. The adapters for providers are the biggest bottleneck in the whole process, so getting this part right was crucial.

We were trying to solve three things: bundle splitting, ease of development, and a better type system.

We don't want to give you a single function that bundles every possible functionality into your code, leaving kilobytes of data you never even use.

The fix was straightforward: break up the monolith into micro-adapters. As every enterprise knows, this is the answer to all business problems. Split it into micro-services. Or in our case, micro-adapters.

After the split, the single openai function turned into openaiText, openaiImage, openaiSummarize, and so on. You choose what you need. We give you the adapter to plug.

Imagine the old approach at scale:

  1. Support 30 different adapters
  2. Add image functionality
  3. Update all 30 adapters that extend BaseAdapter to bring in image support
  4. Make sure all of them work

That would take months to ship.

Here's how it looks with split adapters:

  1. Support 30 different adapters
  2. Add a new BaseImageAdapter
  3. Update however many adapters we want (1 or 30) to export an image adapter with the implemented functionality
  4. Incrementally roll out support for adapters we don't include in the initial release

This approach lets us be incremental and minimal in the surface area we impact. Supporting new functionalities becomes trivial because we don't have the overhead of adding it to every adapter at once.

We can move fast, add new features, and incrementally roll out support as the ecosystem grows. External contributors can add image support for the adapters they need by opening a PR with a few hundred lines of code. We can review it faster and merge it faster.

Our BaseAdapter monolith had already grown to 7 type generics. And it only supported chat.

Now imagine adding all the other functionalities. We'd probably end up somewhere close to 20-30 generics. Good luck implementing a new adapter for a provider we don't support yet.

With the new approach, the generics max out at 3. It's easy to add new adapters. This lets external contributors help us out, and it lets us move through adapters with less complexity and in less time.

One idea was to create an adapter with sub-properties:

Looks nicer. Feels more split. Same problem. It still bundles everything.

We could have used a custom bundling approach in TanStack Start to strip unused parts from the bundle. But we don't want to force you to use our framework for the best experience. This library is for the web ecosystem, not just TanStack users. That approach was out of the question.

We aimed to make TanStack AI easier for both maintainers and the community to get involved. We pulled it off.

The adapters are easy to make, easy to maintain, and easy to reason about. Your bundle size stays minimal. Our productivity stays high.

Out of all the possible outcomes, this one is the best. We're confident in the direction. We're confident you'll enjoy it too.


See it in action: TanStack AI Alpha 2: Every Modality, Better APIs, Smaller Bundles