Skip to content

Migrating to 0.16

Nothing here breaks a build except one import path.

New and additive: the Realtime capability. RealtimeSession holds a live conversation with a realtime model, with @effect-uai/openai/OpenAIRealtimeSession and @effect-uai/google/GeminiLiveSession as providers. Two recipes show it end to end: Realtime voice agent and Camera assistant.

One import path changes. @effect-uai/core/Inbox is now @effect-uai/core/Settle. drainBurst keeps its name, its signature and its behaviour, so the call sites do not move.

import { drainBurst } from "@effect-uai/core/Inbox"
import { drainBurst } from "@effect-uai/core/Settle"

If you use the namespace import, Inbox.drainBurst becomes Settle.drainBurst.

What is new in Settle

settleBurst(stream, settle, options?) is drainBurst over a stream, emitting one array per burst. If you copied the version from the voice-loop recipe, the core one differs in two ways:

  • A failing source fails the stream instead of ending it quietly.
  • The buffer is bounded (64 by default, options.capacity to change it), so a slow consumer suspends the source rather than growing memory without limit.

onQuiet(stream, settle, emit) passes every element straight through and emits whatever emit yields once nothing has arrived for settle, at most once per quiet period. Use it when output must stay live and you only want a boundary marker.

Behaviour change in drainBurst

A queue that ends mid-burst now returns the batch in hand rather than failing, so the last batch before a producer finishes is no longer lost. Interruptions and real failures still propagate. A long-lived inbox that never ends is unaffected.

Realtime transcription moved to the GA wire

OpenAIRealtimeTranscriber still spoke the beta dialect, which OpenAI shut down on 2026-05-12. It now speaks GA. No code changes are needed, but two things are worth knowing:

  • vadEvents stays on unless you pass false. Server VAD is what commits a turn, and only a committed turn yields a final, so a session without it emits partials forever. Models that transcribe continuously rather than segmenting reject the field and need vadEvents: false.
  • Swap the transcription model ids before OpenAI’s 2027-02-26 shutdown: gpt-4o-transcribe and gpt-4o-mini-transcribe become gpt-transcribe for transcribe and gpt-live-transcribe for streamTranscriptionFrom. whisper-1 is still the only model returning wordTimestamps, and has no replacement yet.