- Updated dependencies [
31de22b]:- @tanstack/ai@0.34.0
- @tanstack/ai-event-client@0.6.5
- Updated dependencies [
2cb0313,18e5f4d,21720dd,243b8fa]:- @tanstack/ai@0.33.0
- @tanstack/ai-event-client@0.6.4
- Updated dependencies [
07aaf8b]:- @tanstack/ai@0.31.0
- @tanstack/ai-event-client@0.6.2
-
#769
1d1bb52- Add repository metadata (homepage,bugs,funding), fixrepository.directoryto point at each package, and include an MITLICENSEfile in every published package. -
Updated dependencies [
7103348,1d1bb52]:- @tanstack/ai@0.30.0
- @tanstack/ai-event-client@0.6.1
- Updated dependencies [
ff267a5,570c08a,ff267a5,22c9b42,215b6b4,7d44569]:- @tanstack/ai@0.29.0
- @tanstack/ai-event-client@0.6.0
- Updated dependencies [
496e814,c0af426,00e0c93,496e814]:- @tanstack/ai@0.28.0
- @tanstack/ai-event-client@0.5.4
- Updated dependencies [
6df32b5]:- @tanstack/ai@0.27.0
- @tanstack/ai-event-client@0.5.3
- Updated dependencies [
7adff0f]:- @tanstack/ai-event-client@0.5.2
- @tanstack/ai@0.26.1
- Updated dependencies [
5d6cd28]:- @tanstack/ai@0.26.0
- @tanstack/ai-event-client@0.5.1
-
#242
c251038- Enhanced token usage reporting for every provider.TokenUsageis now the single canonical run-usage type. It is defined once in@tanstack/ai-event-client(the dependency-free leaf package) and re-exported by@tanstack/ai, so the two packages can no longer drift. It carries optional detailed breakdowns alongside the core token counts:promptTokensDetails/completionTokensDetails(cached, reasoning, audio, and per-modality tokens),durationSecondsfor duration-billed models (e.g. Whisper transcription),providerUsageDetailsfor provider-specific metrics, andcost/costDetailsfor provider-reported cost — so a singleusageshape covers counts, detailed breakdowns, and cost.TokenUsageis generic over its provider details bag —TokenUsage<TProviderDetails = ProviderUsageDetails>— so adapters return a strongly-typedproviderUsageDetails(e.g.TokenUsage<AnthropicProviderUsageDetails>) while generic consumers keep the open-record default. The default,ProviderUsageDetails(Record<string, NonNullable<unknown>>), is now exported and uses non-nullish values rather thanunknownsoTokenUsagestays assignable across JSON-serialization boundaries (e.g. TanStack Start server-fn return types). Each provider's usage extractor now returnsundefined(rather than fabricating zeroed totals) when the provider reports no usage object, so an absentusageis distinguishable from a genuine zero-token run.@tanstack/aistill exportsUsageTotalsas a@deprecatedalias ofTokenUsagefor backward compatibility; it will be removed in a future release.Detailed usage is extracted in one place per SDK surface: OpenAI-compatible providers (OpenAI, Grok, Groq) share the extractors in
@tanstack/openai-base, while Anthropic, Gemini, Ollama, and OpenRouter normalize their own provider usage. The devtools surface cached and reasoning token badges per iteration.Usage is now unified across every modality, not just text/chat. Image, audio, and text-to-speech results report the same canonical
TokenUsage(with per-modality breakdowns) instead of a minimalinputTokens/outputTokensshape:ImageGenerationResult.usage,AudioGenerationResult.usage, and the newTTSResult.usageare now typed asTokenUsage. Breaking: consumers of these fields should readpromptTokens/completionTokensinstead ofinputTokens/outputTokens.@tanstack/ai-event-client'sImageUsageis now a@deprecatedalias ofTokenUsage.- OpenAI/Grok image generation surface the text-vs-image input token breakdown
(
promptTokensDetails), Gemini image/audio/TTS now surface their fullusageMetadata(previously dropped), and OpenRouter image generation surfaces the chat usage it already returns. - Bug fixes: Ollama no longer produces
NaNtotals or discards duration-only usage; Anthropic defaults missingoutput_tokensand no longer emits emptypromptTokensDetails/providerUsageDetailsobjects; OpenAI GPT-4o transcription reads the real audio/text input token breakdown and never falls back to duration billing.
Cross-adapter usage parity fixes:
PromptTokensDetails/CompletionTokensDetailsgain adocumentTokensfield, and Gemini now surfacesDOCUMENTmodality token counts (e.g. PDF inputs) instead of silently dropping them.- OpenAI-compatible chat (OpenAI/Grok/Groq via
@tanstack/openai-base) now surfaces Predicted-OutputsacceptedPredictionTokens/rejectedPredictionTokensunderproviderUsageDetails, matching the OpenRouter adapter (rejected prediction tokens are billed). - Grok transcription (
/v1/stt) now reportsdurationSeconds, mirroring the Whisper-1 path in the OpenAI transcription adapter.
-
Updated dependencies [
c251038]:- @tanstack/ai@0.25.0
- @tanstack/ai-event-client@0.5.0
- Updated dependencies [
c1ae8b9,a452ae8,8036b50]:- @tanstack/ai@0.24.0
- @tanstack/ai-event-client@0.4.3
- Updated dependencies [
94bb9c0]:- @tanstack/ai@0.23.1
- @tanstack/ai-event-client@0.4.2
- #632
5634f18- Add hook-aware AI devtools registration, run tracking, state snapshots, and tool fixture replay.
- Updated dependencies [
5634f18]:- @tanstack/ai-event-client@0.4.0
- @tanstack/ai@0.22.1
- Updated dependencies [
02f7d04]:- @tanstack/ai@0.22.0
- @tanstack/ai-event-client@0.3.11
- Updated dependencies [
e144a53]:- @tanstack/ai@0.21.3
- @tanstack/ai-event-client@0.3.10
-
Refresh package README content and npm metadata for better discoverability. (#626)
-
Updated dependencies [
ebeb22e]:- @tanstack/ai@0.21.2
- @tanstack/ai-event-client@0.3.9
- Updated dependencies [
573f12e]:- @tanstack/ai@0.21.1
- @tanstack/ai-event-client@0.3.8
-
Tighten TypeScript safety: enable
noImplicitOverride, (#579)noFallthroughCasesInSwitch, anduseDefineForClassFieldsin the roottsconfig.json; add a typed-ESLint block scoped topackages/*/src/**that turns onno-floating-promises,no-misused-promises,await-thenable,switch-exhaustiveness-check,consistent-type-exports,prefer-readonly, andno-non-null-assertion(errors), plusno-explicit-any(warning).@ts-ignoreand@ts-nocheckare disallowed in library source via@typescript-eslint/ban-ts-comment, andas unknown as <T>double-casts are blocked by ano-restricted-syntaxrule (escape hatches available with an inline reason). Two flags from the original five-flag set —noPropertyAccessFromIndexSignatureandexactOptionalPropertyTypes— were tried and rolled back: they produced ~500 lines of bracket- access and conditional-spread churn without catching any real bugs, andexactOptionalPropertyTypeswould have forced consumers using it themselves to deal with our internals' style preferences.User-visible API surface is unchanged; this is a hardening pass to keep streaming/agent-loop correctness and discriminated-union exhaustiveness honest going forward. See issue #564.
-
Updated dependencies [
2ad137b]:- @tanstack/ai@0.20.1
- @tanstack/ai-event-client@0.3.6
- Updated dependencies [
496db9c]:- @tanstack/ai@0.20.0
- @tanstack/ai-event-client@0.3.5
- Updated dependencies [
617b5b5]:- @tanstack/ai@0.19.1
- @tanstack/ai-event-client@0.3.4
- Updated dependencies [
2e0e2eb]:- @tanstack/ai@0.19.0
- @tanstack/ai-event-client@0.3.3
- Updated dependencies [
87f305c]:- @tanstack/ai@0.16.0
- @tanstack/ai-event-client@0.3.0
- Updated dependencies [
a4e2c55,82078bd,b2d3cc1]:- @tanstack/ai@0.15.0
- @tanstack/ai-event-client@0.2.9
- Updated dependencies [
54523f5,54523f5,af9eb7b,54523f5]:- @tanstack/ai@0.14.0
- @tanstack/ai-event-client@0.2.8
- Updated dependencies [
c1fd96f]:- @tanstack/ai@0.13.0
- @tanstack/ai-event-client@0.2.7
- Updated dependencies [
e32583e]:- @tanstack/ai@0.12.0
- @tanstack/ai-event-client@0.2.6
- Updated dependencies [
633a3d9]:- @tanstack/ai@0.11.1
- @tanstack/ai-event-client@0.2.5
- Updated dependencies [
c780bc1]:- @tanstack/ai@0.10.3
- @tanstack/ai-event-client@0.2.3
- Updated dependencies [
4445410]:- @tanstack/ai@0.10.2
- @tanstack/ai-event-client@0.2.2
- Updated dependencies [
1d1c58f]:- @tanstack/ai@0.10.1
- @tanstack/ai-event-client@0.2.1
- Moves devtools theme to the component to avoid theme miss-match. (#423)
-
Add code mode and isolate packages for secure AI code execution (#362)
Also includes fixes for Ollama tool call argument streaming and usage reporting, OpenAI realtime adapter handling of missing call_id/item_id, realtime client guards for missing toolCallId, and new DevtoolsChatMiddleware type export from ai-event-client.
-
Updated dependencies [
54abae0]:- @tanstack/ai@0.10.0
- @tanstack/ai-event-client@0.2.0
- Updated dependencies [
26d8243]:- @tanstack/ai@0.9.2
- @tanstack/ai-event-client@0.1.4
- Updated dependencies [
b8cc69e]:- @tanstack/ai@0.9.1
- @tanstack/ai-event-client@0.1.3
- Updated dependencies [
842e119]:- @tanstack/ai@0.9.0
- @tanstack/ai-event-client@0.1.2
-
feat: add middleware system and content guard middleware (#367)
- @tanstack/ai: New
@tanstack/ai/middlewaressubpath with composable chat middleware architecture. IncludescontentGuardMiddleware(delta and buffered strategies) andtoolCacheMiddleware. Middleware hooks:onStart,onIteration,onChunk,onToolPhaseComplete,onFinish. - @tanstack/ai-event-client: Initial release. Extracted
devtoolsMiddlewarefrom@tanstack/aicore into a standalone package for tree-shaking. Emits all DevTools events as an observation-only middleware. - @tanstack/ai-client: Updated event types for middleware integration.
- @tanstack/ai-devtools: Updated iteration timeline and conversation UI for middleware-aware event handling.
- @tanstack/ai: New
-
Updated dependencies [
f62eeb0]:- @tanstack/ai@0.8.0
- @tanstack/ai-event-client@0.1.0
- Updated dependencies [
86be1c8]:- @tanstack/ai@0.7.0
- @tanstack/ai-event-client@0.0.2
- Updated dependencies [
6dfffca]:- @tanstack/ai@0.6.3
- Updated dependencies [
2ee0b33]:- @tanstack/ai@0.6.2
- Updated dependencies [
d8678e2]:- @tanstack/ai@0.6.1
- Updated dependencies [
58702bc]:- @tanstack/ai@0.5.1
- Updated dependencies [
6f886e9]:- @tanstack/ai@0.4.2
- Updated dependencies [
6e1bb50]:- @tanstack/ai@0.4.1
- add multiple modalities support to the client (#263)
- Updated dependencies [
0158d14]:- @tanstack/ai@0.4.0
- Updated dependencies [
230bab6]:- @tanstack/ai@0.3.1
- Updated dependencies [
e52135f]:- @tanstack/ai@0.3.0
- Fix issue with double mounting of devtools (#123)
- Bump tanstack-devtools to 0.2.3 (#204)
- Updated dependencies [
7573619]:- @tanstack/ai@0.2.2
- Updated dependencies [
c5df33c]:- @tanstack/ai@0.2.0
- Split up adapters for better tree shaking into separate functionalities (#137)
- Updated dependencies [
8d77614]:- @tanstack/ai@0.1.0
- Updated dependencies [
64fda55]:- @tanstack/ai@0.0.2