Releases: TanStack/ai
@tanstack/solid-ai-devtools@0.2.29
Patch Changes
- Updated dependencies []:
- @tanstack/ai-devtools-core@0.3.25
@tanstack/react-ai-devtools@0.2.29
Patch Changes
- Updated dependencies []:
- @tanstack/ai-devtools-core@0.3.25
@tanstack/preact-ai-devtools@0.1.29
Patch Changes
- Updated dependencies []:
- @tanstack/ai-devtools-core@0.3.25
@tanstack/ai@0.14.0
Minor Changes
-
feat: add generateAudio activity for music and sound-effect generation (#463)
Adds a new
audioactivity kind alongside the existingttsandtranscriptionactivities:generateAudio()/createAudioOptions()functionsAudioAdapterinterface andBaseAudioAdapterbase classAudioGenerationOptions/AudioGenerationResult/GeneratedAudiotypesaudio:request:started,audio:request:completed, andaudio:usagedevtools events
-
feat: add
useGenerateAudiohook and streaming support forgenerateAudio()(#463)Closes the parity gap between audio generation and the other media
activities (image, speech, video, transcription, summarize):generateAudio()now acceptsstream: true, returning an
AsyncIterable<StreamChunk>that can be piped through
toServerSentEventsResponse().AudioGenerateInputtype added to@tanstack/ai-client.useGenerateAudiohook added to@tanstack/ai-react,
@tanstack/ai-solid, and@tanstack/ai-vue; matching
createGenerateAudioadded to@tanstack/ai-svelte. All follow the same
{ generate, result, isLoading, error, status, stop, reset }shape as
the existing media hooks and support bothconnection(SSE) and
fetchertransports.
-
Tighten
GeneratedImageandGeneratedAudioto enforce exactly one ofurlorb64Jsonvia a mutually-exclusiveGeneratedMediaSourceunion. (#463)Both types previously declared
url?andb64Json?as independently optional, which allowed meaningless{}values and objects that set both fields. They now require exactly one:type GeneratedMediaSource = | { url: string; b64Json?: never } | { b64Json: string; url?: never }
Existing read patterns like
img.url || \data:image/png;base64,${img.b64Json}`continue to work unchanged. The only runtime-visible change is that the@tanstack/ai-openrouterand@tanstack/ai-falimage adapters no longer populateurlwith a synthesizeddata:image/png;base64,...URI when the provider returns base64 — they return{ b64Json }only. Consumers that want a data URI should build it fromb64Json` at render time.
Patch Changes
-
refactor(ai, ai-openai): narrow error handling before logging (#465)
catch (error: any)sites instream-to-response.ts,activities/stream-generation-result.ts, andactivities/generateVideo/index.tsare now narrowed tounknownand funnel through a sharedtoRunErrorPayload(error, fallback)helper that extractsmessage/codewithout leaking the original error object (which can carry request state from an SDK).Replaced four
console.errorcalls in the OpenAI text adapter'schatStreamcatch block that dumped the full error object to stdout. SDK errors can carry the original request including auth headers, so the library now logs only the narrowed{ message, code }payload via the internal logger — any user-supplied logger receives the sanitized shape, not the raw SDK error. -
Updated dependencies []:
- @tanstack/ai-event-client@0.2.8
@tanstack/ai-vue@0.7.0
Minor Changes
-
feat: add
useGenerateAudiohook and streaming support forgenerateAudio()(#463)Closes the parity gap between audio generation and the other media
activities (image, speech, video, transcription, summarize):generateAudio()now acceptsstream: true, returning an
AsyncIterable<StreamChunk>that can be piped through
toServerSentEventsResponse().AudioGenerateInputtype added to@tanstack/ai-client.useGenerateAudiohook added to@tanstack/ai-react,
@tanstack/ai-solid, and@tanstack/ai-vue; matching
createGenerateAudioadded to@tanstack/ai-svelte. All follow the same
{ generate, result, isLoading, error, status, stop, reset }shape as
the existing media hooks and support bothconnection(SSE) and
fetchertransports.
Patch Changes
-
fix(ai-react, ai-preact, ai-vue, ai-solid): propagate
useChatcallback changes (#465)onResponse,onChunk, andonCustomEventwere captured by reference at client creation time. When a parent component re-rendered with fresh closures, theChatClientkept calling the originals. Every framework now wraps these callbacks so the latestoptions.xxxis read at call time (viaoptionsRef.currentin React/Preact, and direct option access in Vue/Solid, matching the pattern already used foronFinish/onError). Clearing a callback (setting it toundefined) now correctly no-ops instead of continuing to invoke the stale handler. -
Updated dependencies [
54523f5,54523f5,af9eb7b,008f015,54523f5]:- @tanstack/ai@0.14.0
- @tanstack/ai-client@0.8.0
@tanstack/ai-vue-ui@0.1.31
@tanstack/ai-svelte@0.7.0
Minor Changes
-
feat: add
useGenerateAudiohook and streaming support forgenerateAudio()(#463)Closes the parity gap between audio generation and the other media
activities (image, speech, video, transcription, summarize):generateAudio()now acceptsstream: true, returning an
AsyncIterable<StreamChunk>that can be piped through
toServerSentEventsResponse().AudioGenerateInputtype added to@tanstack/ai-client.useGenerateAudiohook added to@tanstack/ai-react,
@tanstack/ai-solid, and@tanstack/ai-vue; matching
createGenerateAudioadded to@tanstack/ai-svelte. All follow the same
{ generate, result, isLoading, error, status, stop, reset }shape as
the existing media hooks and support bothconnection(SSE) and
fetchertransports.
Patch Changes
@tanstack/ai-solid@0.7.0
Minor Changes
-
feat: add
useGenerateAudiohook and streaming support forgenerateAudio()(#463)Closes the parity gap between audio generation and the other media
activities (image, speech, video, transcription, summarize):generateAudio()now acceptsstream: true, returning an
AsyncIterable<StreamChunk>that can be piped through
toServerSentEventsResponse().AudioGenerateInputtype added to@tanstack/ai-client.useGenerateAudiohook added to@tanstack/ai-react,
@tanstack/ai-solid, and@tanstack/ai-vue; matching
createGenerateAudioadded to@tanstack/ai-svelte. All follow the same
{ generate, result, isLoading, error, status, stop, reset }shape as
the existing media hooks and support bothconnection(SSE) and
fetchertransports.
Patch Changes
-
fix(ai-react, ai-preact, ai-vue, ai-solid): propagate
useChatcallback changes (#465)onResponse,onChunk, andonCustomEventwere captured by reference at client creation time. When a parent component re-rendered with fresh closures, theChatClientkept calling the originals. Every framework now wraps these callbacks so the latestoptions.xxxis read at call time (viaoptionsRef.currentin React/Preact, and direct option access in Vue/Solid, matching the pattern already used foronFinish/onError). Clearing a callback (setting it toundefined) now correctly no-ops instead of continuing to invoke the stale handler. -
Updated dependencies [
54523f5,54523f5,af9eb7b,008f015,54523f5]:- @tanstack/ai@0.14.0
- @tanstack/ai-client@0.8.0
@tanstack/ai-solid-ui@0.6.2
@tanstack/ai-react@0.8.0
Minor Changes
-
feat: add
useGenerateAudiohook and streaming support forgenerateAudio()(#463)Closes the parity gap between audio generation and the other media
activities (image, speech, video, transcription, summarize):generateAudio()now acceptsstream: true, returning an
AsyncIterable<StreamChunk>that can be piped through
toServerSentEventsResponse().AudioGenerateInputtype added to@tanstack/ai-client.useGenerateAudiohook added to@tanstack/ai-react,
@tanstack/ai-solid, and@tanstack/ai-vue; matching
createGenerateAudioadded to@tanstack/ai-svelte. All follow the same
{ generate, result, isLoading, error, status, stop, reset }shape as
the existing media hooks and support bothconnection(SSE) and
fetchertransports.
Patch Changes
-
fix(ai-react, ai-preact, ai-vue, ai-solid): propagate
useChatcallback changes (#465)onResponse,onChunk, andonCustomEventwere captured by reference at client creation time. When a parent component re-rendered with fresh closures, theChatClientkept calling the originals. Every framework now wraps these callbacks so the latestoptions.xxxis read at call time (viaoptionsRef.currentin React/Preact, and direct option access in Vue/Solid, matching the pattern already used foronFinish/onError). Clearing a callback (setting it toundefined) now correctly no-ops instead of continuing to invoke the stale handler. -
Updated dependencies [
54523f5,54523f5,af9eb7b,008f015,54523f5]:- @tanstack/ai@0.14.0
- @tanstack/ai-client@0.8.0