Releases: TanStack/ai
@tanstack/[email protected]
Patch Changes
- Updated dependencies []:
- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies []:
- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies []:
- @tanstack/[email protected]
@tanstack/[email protected]
@tanstack/[email protected]
Minor Changes
-
#723
22c9b42- Surface fal's billed units asresult.usage. The fal adapters now read fal'sx-fal-billable-unitsresponse header off the result fetch and expose the billed quantity (usage.unitsBilled) on the generation result, so consumers can compute exact media-generation cost without wrappingfetchthemselves.TokenUsagegains an optionalunitsBilledfield for usage-based (non-token) billing, denominated in the provider's priced unit.falImage,falAudio,falVideo,falSpeech, andfalTranscriptionpopulateresult.usage.unitsBilledwhen fal reports it.VideoUrlResultgains an optionalusageslot;getVideoJobStatusnow emits thevideo:usageevent and returnsusagewhen the completed result reports billed units.
-
#727
7d44569- Add an'error'terminal toToolCallState. When a tool execution produces an output error, the StreamProcessor now transitions thetool-callpart tostate: 'error'instead of parking it at'input-complete'.Previously an errored tool call left the tool-call part at
'input-complete'forever, so UIs that render lifecycle from the part'sstatecould not distinguish "still executing" from "failed" without reverse-engineering the error-shapedoutputor the siblingtool-resultpart. The new terminal makes the tool-call state machine self-describing and symmetric withToolResultState(which already has'error'):if (part.type === 'tool-call' && part.state === 'error') { // render failure — no more inferring from output shape }
The completion safety net (
RUN_FINISHED/ stream finalization) no longer downgrades a failed tool call back to'input-complete', including when anoutput-errorresult arrives beforeTOOL_CALL_END.
Patch Changes
-
#696
ff267a5- Fix duplicateTOOL_CALL_ENDfor server-executed tools. The adapter already streamsSTART/ARGS/ENDfor each tool call, butchat()emitted a secondENDafterwards with no matchingSTART— an orphan event that AG-UI-strict consumers (e.g.@ag-ui/client'sverifyEvents) reject. The post-execution phase now only addsTOOL_CALL_RESULT. Fixes #519. -
#734
570c08a- Fix the default debug logger droppingmetapayloads on Cloudflare Workers / workerd (#730).ConsoleLoggerpreviously renderedmetawithconsole.dir, which workerd never forwards to the terminal — debug mode printed category headlines but no request bodies, chunk contents, orRUN_ERRORpayloads. The logger now detects the runtime: Node keeps the depth-unlimitedconsole.dirdump, Cloudflare Workers rendersmetaas circular-safe pretty-printed JSON (workerd's own inspect truncates nested objects), and other runtimes (browsers, Deno, Bun) receivemetaas an extra console argument so devtools keep collapsible trees. Detection checks workerd'snavigator.userAgentmarker beforeprocess.versions.node, sincenodejs_compatemulates a Node version string. -
#699
215b6b4- Migrate the OpenAI realtime adapters from the retired Beta API (shut down 2026-05-12) to the GA API:openaiRealtime()now exchanges WebRTC SDP viaPOST /v1/realtime/calls(the Beta?model=shape returnedbeta_api_shape_disabled).openaiRealtimeToken()now mints ephemeral keys viaPOST /v1/realtime/client_secretsinstead of the retired/v1/realtime/sessions, and parses the GA top-levelvalue/expires_atresponse shape.session.updatepayloads use the GA shape: requiredsession.type,audio.input.transcription,audio.input.turn_detection,audio.output.voice,output_modalities, andmax_output_tokens.temperaturewas removed from the GA session config and is no longer sent (a debug log notes when it is dropped).- Server events are handled under their GA names (
response.output_audio_transcript.*,response.output_audio.*,output_text/output_audiocontent parts). - The default realtime model is now
gpt-realtime; thegpt-4o-(mini-)realtime-previewids (shut down by OpenAI on 2026-05-07) were removed fromOpenAIRealtimeModel.
-
Updated dependencies [
ff267a5,22c9b42,7d44569]:- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies [
ff267a5,570c08a,22c9b42,215b6b4,7d44569]:- @tanstack/[email protected]
- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies []:
- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies [
ff267a5,570c08a,22c9b42,215b6b4,7d44569]:- @tanstack/[email protected]
- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies [
ff267a5,570c08a,22c9b42,215b6b4,7d44569]:- @tanstack/[email protected]
- @tanstack/[email protected]
@tanstack/[email protected]
Patch Changes
- Updated dependencies [
7d44569]:- @tanstack/[email protected]
- @tanstack/[email protected]