Skip to content

v5.4.0

Choose a tag to compare

@github-actions github-actions released this 01 Jun 11:05
0d4e274

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 / DeepgramTransportFactory interface (src/transport.ts) and a transportFactory option on DeepgramClient. When set, the listen.v1, listen.v2, speak.v1, and agent.v1 createConnection paths route through a custom transport via a TransportWebSocketAdapter instead of the default WebSocket; REST behaviour is unchanged. This is the seam the @deepgram/sagemaker package 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.

  • reconnect flag with auto-disable for custom transports (8dec8c9)

    New optional reconnect?: boolean on DeepgramClient (default true, exposed read-only as client.reconnect) controlling wrapper-level retry of streaming connections. Auto-disabled to false when a transportFactory is 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 explicit reconnect: true.

Bug Fixes

  • Expose WebSocket helper types (#501) (ac71def) — thanks @asim48-ctrl

    The agent / listen / speak getters were typed against the generated client, which hid the wrapper's createConnection() method and typed Authorization as required. They now expose typed WebSocket wrapper clients, so client.listen.v1.createConnection({ model: "nova-3" }) type-checks and Authorization is optional. Runtime behaviour is unchanged — this is a types-only fix. Fixes #489.