tanstack-ai-migration
Skill3.2k starsChanged 2 months agoMITView on GitHub
Move an app to TanStack AI from the Vercel AI SDK or raw provider SDKs, or move it off a deprecated TanStack AI API. Use when someone asks whether to switch AI libraries, when code mixes streamText, generateText, generateObject, createOpenAI, or @ai-sdk/* with TanStack AI, when an upgrade breaks, or when someone hits a renamed option, a deprecated -ui package, or an old adapter shape. Triggers on "migrate", "switch from Vercel AI SDK", "ai-sdk", "streamText", "upgrade TanStack AI", "deprecated", "breaking change", "codemod".
Trending
More talk lately.about the whole repository
Who's talking about TanStack/ai
- nuxt/ui“Integrate chat components with Tanstack AI”GitHub · Jan 27, 2026 · 2 reactions
- getsentry/sentry-javascript“Add instrumentation for `@tanstack/ai`”GitHub · Jan 5, 2026 · 2 reactions
- kubb-labs/kubb“Use Knip for unused code detection”GitHub · Dec 18, 2025 · 2 reactions
- @jp-knj.bsky.social“github.com/TanStack/ai I’m curious”Bluesky · Dec 5, 2025 · 2 likes
- TanStack/tanstack.com“fix(builder): unlock BYOK passkey on the click, not mid-send”GitHub · Sep 5, 2026 · 1 reactions
The biggest 5 of 30 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 30
Talked about on GitHub and Bluesky (30 times).
On GitHub · 28
- Jan 27, 2026Integrate chat components with Tanstack AI — nuxt/ui2 reactions · 7 comments
- Jan 5, 2026Add instrumentation for `@tanstack/ai` — getsentry/sentry-javascript2 reactions · 1 comment
- Dec 18, 2025Use Knip for unused code detection — kubb-labs/kubb2 reactions · 2 comments
- Sep 5, 2026fix(builder): unlock BYOK passkey on the click, not mid-send — TanStack/tanstack.com1 reaction · 3 comments
- Jun 30, 2026build(deps): bump the bun-dependencies group with 9 updates — endalk200/skopeo1 reaction
23 more on GitHub
- Oct 5, 2026fix(ai-search): Haiku keyword extraction has fallen back on every search since 2026-06-12 — viclafouch/petit-meme0 reactions
- Oct 5, 2026chore(deps): bump the framework-deps group with 13 updates — clanker25/ui0 reactions
- Oct 5, 2026build(deps): Bump the production-minor-patch group across 1 directory with 22 updates — kvpendergast/jackline0 reactions
- Oct 3, 2026[Add] TanStack AI (TanStack/ai) — PyTorchKR/landscape0 reactions
- Oct 1, 2026chore(deps-dev): bump the development-dependencies group across 1 directory with 19 updates — cbangera2/BudgetLens0 reactions · 1 comment
- Oct 1, 2026Bump @tanstack/ai-client from 0.35.1 to 0.36.0 — unacms/UNA0 reactions · 1 comment
- Sep 30, 2026chore(deps): bump the framework-deps group with 13 updates — zhcndoc/shadcn0 reactions
- Sep 28, 2026chore(deps): bump the runtime-dependencies group across 1 directory with 4 updates — changbaebang/career-radar0 reactions
- Sep 27, 2026chore(deps): bump @tanstack/ai-code-mode from 0.4.10 to 0.4.13 — FRFlo/dumbdiscordbot0 reactions
- Sep 27, 2026chore(deps): bump @tanstack/ai from 0.55.0 to 0.58.0 — FRFlo/dumbdiscordbot0 reactions
- Sep 21, 2026fix(deps): bump @tanstack/ai-vue from 0.19.4 to 0.24.0 — vinayakkulkarni/tileserver-rs0 reactions · 2 comments
- Sep 17, 2026chore(deps): bump the framework-deps group with 13 updates — morganfeeney/shadcn-ui-fork0 reactions · 1 comment
- Sep 9, 2026chore(web)(deps): bump the web-dependencies group across 1 directory with 16 updates — najmuzzaman-mohammad/gawkbot0 reactions · 1 comment
- Sep 8, 2026chore(deps): bump @tanstack/ai-react from 0.16.4 to 0.24.0 — moodyawhvh/ui-chinese0 reactions
- Sep 1, 2026Bump @tanstack/ai from 0.39.1 to 0.52.0 — MrLightful/scopra0 reactions · 1 comment
- Aug 31, 2026chore(deps): bump the tanstack-ai group across 1 directory with 4 updates — linuxing3/openstory0 reactions · 1 comment
- Aug 24, 2026build(deps): bump @tanstack/ai-react from 0.19.2 to 0.21.1 — sushindustries/sushindustries0 reactions · 1 comment
- Aug 15, 2026build(deps-dev): bump the npm-dependencies group across 1 directory with 7 updates — sbonnick/openai-oauth-ai-provider0 reactions
- Aug 10, 2026chore(deps): bump the tanstack group across 1 directory with 17 updates — RLukas2/portfolio0 reactions · 1 comment
- Aug 4, 2026chore(deps): bump @tanstack/ai-react from 0.16.4 to 0.18.1 — raynilkumar-bs/Agent-V20 reactions · 2 comments
- Jul 8, 2026build(deps): Bump the tanstack group with 4 updates — fly-apps/tanstack-sprite-agent0 reactions
- Jun 12, 2026Bump the all-deps group across 1 directory with 27 updates — pantha-dapp/CORE0 reactions
- May 22, 2026Bump the all-deps group across 1 directory with 5 updates — pantha-dapp/CORE0 reactions
On Bluesky · 2
- Dec 5, 2025github.com/TanStack/ai I’m curious — @jp-knj.bsky.social2 likes and reposts
- Mar 19, 2026https://github.com/TanStack/ai — @tom-doerr.bsky.social1 likes and repost
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/instructions/copilot-instructions.mdCopilot instructions
- add-example-tutorialSkill
- bugfix-prSkill
- docsSkill
- gap-analysisSkill
- i-have-adhdSkill
- new-react-playgroundSkill
- ponytailSkill
- pr-descriptionSkill
- pr-sweepSkill
- simple-englishSkill
- triage-githubSkill
- add-example-tutorialSkill
- bugfix-prSkill
- docsSkill
- gap-analysisSkill
- i-have-adhdSkill
- new-react-playgroundSkill
- ponytailSkill
- pr-descriptionSkill
- pr-sweepSkill
- simple-englishSkill
- triage-githubSkill
- tanstack-aiSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Read the guide, then load the target API's own skill with npx @tanstack/intent@latest load @tanstack/ai#ai-core.
- Distinctive: line 41
Start with the version the app has, and the current release:
- Very specific: line 74
Run the project's type checker.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Migrating to TanStack AI
Two different jobs. Pick the one that matches the code in front of you.
Coming from another SDK
The name-by-name mapping lives in the docs, and it is longer than any summary that fits here:
https://tanstack.com/ai/latest/docs/migration/migration-from-vercel-ai
The shape of the change:
streamTextandgenerateTextbecome onechat()call with a streaming option.createOpenAI(...)becomes a tree-shakeable adapter, such asopenaiText()from@tanstack/ai-openai.onFinishand friends become middleware hooks.- Manual SSE wiring becomes the built-in response helpers.
generateObjectbecomes structured outputs onchat().
Read the guide, then load the target API's own skill with
npx @tanstack/intent@latest load @tanstack/ai#ai-core. Do not port from memory: a half-remembered mapping produces
code that type-checks in neither SDK.
Upgrading TanStack AI itself
Start with the version the app has, and the current release:
node -p "require('@tanstack/ai/package.json').version"
npm view @tanstack/ai versionThen read the guides for what changed:
- https://tanstack.com/ai/latest/docs/migration/migration
- https://tanstack.com/ai/latest/docs/migration/ag-ui-compliance
- https://tanstack.com/ai/latest/docs/migration/sampling-options-to-model-options
- https://tanstack.com/ai/latest/docs/migration/create-ui
Deprecated APIs keep working, so upgrade in steps rather than rewriting everything at once.
Codemods
Some renames have a jscodeshift transform. Run it straight from the repo, and
preview first with --dry --print:
npx jscodeshift \
-t https://raw.githubusercontent.com/TanStack/ai/main/codemods/ag-ui-compliance/transform.ts \
--dry --print src/Each guide names the codemod that covers it, and what the codemod cannot reach. Server-side rewrites are usually manual.
After the port
Run the project's type checker. Most errors after a migration come from an API
that was remembered rather than read, so check the failing name against
node_modules/@tanstack/ai/src/ before changing it again.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

