Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: TanStack/ai

@tanstack/[email protected]

15 Jun 12:21
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:20
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:20
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:21
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:19
def8582

Choose a tag to compare

Minor Changes

  • #723 22c9b42 - Surface fal's billed units as result.usage. The fal adapters now read fal's x-fal-billable-units response 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 wrapping fetch themselves.

    • TokenUsage gains an optional unitsBilled field for usage-based (non-token) billing, denominated in the provider's priced unit.
    • falImage, falAudio, falVideo, falSpeech, and falTranscription populate result.usage.unitsBilled when fal reports it.
    • VideoUrlResult gains an optional usage slot; getVideoJobStatus now emits the video:usage event and returns usage when the completed result reports billed units.
  • #727 7d44569 - Add an 'error' terminal to ToolCallState. When a tool execution produces an output error, the StreamProcessor now transitions the tool-call part to state: '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's state could not distinguish "still executing" from "failed" without reverse-engineering the error-shaped output or the sibling tool-result part. The new terminal makes the tool-call state machine self-describing and symmetric with ToolResultState (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 an output-error result arrives before TOOL_CALL_END.

Patch Changes

  • #696 ff267a5 - Fix duplicate TOOL_CALL_END for server-executed tools. The adapter already streams START/ARGS/END for each tool call, but chat() emitted a second END afterwards with no matching START — an orphan event that AG-UI-strict consumers (e.g. @ag-ui/client's verifyEvents) reject. The post-execution phase now only adds TOOL_CALL_RESULT. Fixes #519.

  • #734 570c08a - Fix the default debug logger dropping meta payloads on Cloudflare Workers / workerd (#730). ConsoleLogger previously rendered meta with console.dir, which workerd never forwards to the terminal — debug mode printed category headlines but no request bodies, chunk contents, or RUN_ERROR payloads. The logger now detects the runtime: Node keeps the depth-unlimited console.dir dump, Cloudflare Workers renders meta as circular-safe pretty-printed JSON (workerd's own inspect truncates nested objects), and other runtimes (browsers, Deno, Bun) receive meta as an extra console argument so devtools keep collapsible trees. Detection checks workerd's navigator.userAgent marker before process.versions.node, since nodejs_compat emulates 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 via POST /v1/realtime/calls (the Beta ?model= shape returned beta_api_shape_disabled).
    • openaiRealtimeToken() now mints ephemeral keys via POST /v1/realtime/client_secrets instead of the retired /v1/realtime/sessions, and parses the GA top-level value/expires_at response shape.
    • session.update payloads use the GA shape: required session.type, audio.input.transcription, audio.input.turn_detection, audio.output.voice, output_modalities, and max_output_tokens. temperature was 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_audio content parts).
    • The default realtime model is now gpt-realtime; the gpt-4o-(mini-)realtime-preview ids (shut down by OpenAI on 2026-05-07) were removed from OpenAIRealtimeModel.
  • Updated dependencies [ff267a5, 22c9b42, 7d44569]:

@tanstack/[email protected]

15 Jun 12:20
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:21
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:20
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:20
def8582

Choose a tag to compare

Patch Changes

@tanstack/[email protected]

15 Jun 12:20
def8582

Choose a tag to compare

Patch Changes