Skip to content
PluginStats

@tanstack/ai-utils weekly downloads statistics

By tanstack (52 listings) · npm · AI SDKs

Shared TypeScript utilities for TanStack AI provider adapters and runtime packages.

View on npm Fresh · Oct 17, 2026

@tanstack/ai-utils has 386,496 recorded weekly downloads on npm, an increase of 47.9% over the past 30 days.

It ranks #275 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +206%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
386,496
Official API · Oct 17, 2026
7-day growth
-21.3%
-104.4K weekly downloads
30-day growth
+47.9%
+125.2K weekly downloads
90-day growth
+206%
+260K weekly downloads
Rank
#275
Among tracked npm listings

About @tanstack/ai-utils

@tanstack/ai-utils

Shared TypeScript utilities for TanStack AI provider adapters and runtime packages.

This is an internal dependency of the provider adapters (@tanstack/ai-openai, @tanstack/ai-anthropic, @tanstack/ai-gemini, …) and runtime packages. It has no dependencies of its own and no framework or provider code; you normally get it transitively rather than installing it yourself. It is documented here so adapter authors know what already exists before writing their own.

Installation

What's in it

| Export | Purpose |

| generateId(prefix) | Prefixed unique id: ${prefix}-${timestamp}-${random}, with the full base36 random portion kept for entropy. | | getApiKeyFromEnv(name) | Reads name from window.env (browser) or process.env (Node) and throws a clear error naming the variable when it is missing. | | arrayBufferToBase64, base64ToArrayBuffer, base64ToUint8Array | Cross-runtime base64 helpers. Prefer the native Uint8Array.toBase64() / fromBase64() when available, then Node's Buffer, then atob / btoa. | | transformNullsToUndefined(value) | Recursively strips every null from JSON-shaped structured output so .optional() fields round-trip through Zod. Schema-blind. | | undoNullWidening(value, map?) | Strips only the nulls that strict-mode schema widening synthesized, using the NullWideningMap recorded by the widening pass. .nullable() fields keep their nulls. |

Ids and API keys

Base64

Be cautious with large buffers on serverless and Workers runtimes: base64 multiplies the memory footprint by about 1.33× and can OOM the isolate.

Nulls in structured output

OpenAI-style strict schemas require optional fields to be widened to required + nullable, so the provider returns null for an absent optional. Validating that null against the original schema fails, because .optional() means T | undefined, not T | null.

• undoNullWidening(value, map) is the precise fix: it consults the NullWideningMap built by convertSchemaForStructuredOutput in @tanstack/ai and drops only the nulls the widening pass introduced, so both optional and nullable fields round-trip. With no map, the value is returned untouched. • transformNullsToUndefined(value) is the schema-blind fallback: it strips every null, including ones a .nullable() field legitimately allows, and is meant for JSON.parse output only (class instances, Date, Map, Set are not preserved).

License

MIT

Description from the npm listing.

  • ai
  • ai-sdk
  • typescript
  • tanstack
  • utilities
  • adapter
  • provider-adapter

Where @tanstack/ai-utils sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,248 listings · 113 pages · page 14, #15 (overall #275)
All npm: every listing in weekly downloads order
PNG SVG
AI SDKs249 listings · 13 pages · page 1, #8 (overall #8)
AI SDKs: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@tanstack/ai-utils weekly downloads on npm, last 90 days: 386,496 weekly downloads as of Oct 17, 2026, +206% over 90 days.@tanstack/ai-utilsWeekly downloads on npm · Last 90 days386,496downloads / week+206% over 90 days0100K200K300K400K500K600K700KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
@tanstack/ai-utils weekly downloads on npm, last 90 days: 386,496 weekly downloads as of Oct 17, 2026, +206% over 90 days.
PNG SVG

7/30/90-day growth

@tanstack/ai-utils weekly downloads growth on npm: -21.3% over 7 days, +47.9% over 30 days, +206% over 90 days.@tanstack/ai-utilsWeekly downloads growth on npm386,496downloads / week now7-day growth-104,420 weekly downloads-21.3%30-day growth+125,212 weekly downloads+47.9%90-day growth+260,048 weekly downloads+206%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@tanstack/ai-utils weekly downloads growth on npm: -21.3% over 7 days, +47.9% over 30 days, +206% over 90 days.
PNG SVG

Ranking history

@tanstack/ai-utils npm ranking history: currently #275 (by weekly downloads).@tanstack/ai-utilsnpm ranking · by weekly downloads · Last 90 days#275current rank#273#274#275#276#277Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
@tanstack/ai-utils npm ranking history: currently #275 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (121)
Recent weekly downloads observations for @tanstack/ai-utils
Date (UTC)Weekly downloadsChange vs. previous
386,496-83.5K
470,028+37.6K
432,400-131.6K
563,994-105.3K
669,2820
669,282+135.1K
534,139+43.2K
490,916+43.9K
447,001+51.7K
395,330+50.4K
344,908+24.5K
320,436-72K
392,395-75.1K
467,461—

Similar npm AI SDKs plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@tanstack/ai-utils. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.