---
title: "TanStack AI: Why We Split the Adapters"
url: https://daily.dev/posts/tanstack-ai-why-we-split-the-adapters-99h4mlgiu
source_url: https://tanstack.com/blog/tanstack-ai-why-we-split-the-adapters
type: article
source: "TanStack"
published: 2026-08-23T12:24:04.016Z
updated: 2026-08-23T12:59:48.486Z
tags: ["architecture", "typescript", "tanstack"]
reading_time: 3
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TanStack AI: Why We Split the Adapters

**[TanStack](https://daily.dev/sources/tanstack-blog)** · 3 min read · 0 upvotes · 0 comments

## Summary

TanStack AI's team explains why they refactored their monolithic provider adapters into smaller, single-purpose micro-adapters (e.g. splitting a single openai function into openaiText, openaiImage, openaiSummarize). The change targets bundle splitting, easier development, and a simpler type system, reducing generic type parameters from a projected 20-30 down to a max of 3, and making it easier for external contributors to add new provider support.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tanstack.com/blog/tanstack-ai-why-we-split-the-adapters>

## Questions this post answers

### Why did TanStack AI split its provider adapters like openai into separate functions such as openaiText and openaiImage?

TanStack AI split its single monolithic provider adapters into smaller, function-specific adapters to solve three problems: bundle splitting, ease of development, and a better type system. The old openai function became openaiText, openaiImage, openaiSummarize, and more, so developers only bundle the functionality they actually use, avoiding unused kilobytes in their app.

_Track architectural shifts like this one in your AI toolchain by following TanStack AI updates on daily.dev._

### How many TypeScript generics did the old TanStack AI BaseAdapter have compared to the new split adapter design?

The old monolithic BaseAdapter had already grown to 7 type generics while only supporting chat, and was projected to reach 20-30 generics once other functionalities like image and summarization were added. After splitting into micro-adapters, the generics max out at 3, making it far easier for external contributors to build new provider adapters.

_Developers weighing adapter architecture trade-offs can follow these design decisions on daily.dev._

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#typescript](https://daily.dev/tags/typescript), [#tanstack](https://daily.dev/tags/tanstack)

[View this post on daily.dev](https://daily.dev/posts/tanstack-ai-why-we-split-the-adapters-99h4mlgiu)
