v5.4.0
5.4.0 (2026-06-01)
Adds a pluggable streaming-transport layer (the JS side of the cross-SDK SageMaker work) and fixes the TypeScript types exposed for the WebSocket helper clients. Fully backwards-compatible — every new option is optional with existing defaults, so current callers need no code changes.
Features
-
Pluggable transport interface for SageMaker support (#492) (4d43b1b)
Adds a
DeepgramTransport/DeepgramTransportFactoryinterface (src/transport.ts) and atransportFactoryoption onDeepgramClient. When set, thelisten.v1,listen.v2,speak.v1, andagent.v1createConnectionpaths route through a custom transport via aTransportWebSocketAdapterinstead of the default WebSocket; REST behaviour is unchanged. This is the seam the@deepgram/sagemakerpackage plugs into, validated end-to-end against live Nova-3 STT, Flux, and Aura TTS endpoints (including a 400-concurrent-connection burst). Mirrors the same work in the Python and Java SDKs. -
reconnectflag with auto-disable for custom transports (8dec8c9)New optional
reconnect?: booleanonDeepgramClient(defaulttrue, exposed read-only asclient.reconnect) controlling wrapper-level retry of streaming connections. Auto-disabled tofalsewhen atransportFactoryis supplied, so self-retrying transports aren't double-stacked with a second retry layer (which caused storm-on-storm behaviour under burst load). Opt back in with an explicitreconnect: true.
Bug Fixes
-
Expose WebSocket helper types (#501) (ac71def) — thanks @asim48-ctrl
The
agent/listen/speakgetters were typed against the generated client, which hid the wrapper'screateConnection()method and typedAuthorizationas required. They now expose typed WebSocket wrapper clients, soclient.listen.v1.createConnection({ model: "nova-3" })type-checks andAuthorizationis optional. Runtime behaviour is unchanged — this is a types-only fix. Fixes #489.