> This page is for SDKs, version Legacy.
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 3.14.2

**`(fix):`** Fix double-wrapping of Optional.empty() in request bodies. Wire tests and dynamic snippets now correctly generate Optional.empty() instead of Optional.of(Optional.empty()) for optional request bodies.

## 3.14.1

**`(fix):`** Fix wire test failures by pruning union base properties from expected JSON. The Java generator does not generate base properties for union types, so wire test expectations now exclude these fields to match actual SDK serialization behavior.

## 3.14.0

**`(feat):`** Add support for WebSocket channels with bidirectional communication. Generated WebSocket clients
provide automatic reconnection with exponential backoff, strongly-typed message handlers, and message
queuing during disconnections. Clients are accessible via factory methods in subpackage clients.

```java
// Create WebSocket client with path and query parameters
RealtimeWebSocketClient ws = client.realtime().realtimeWebSocket(
    "session-123",
    Optional.of("gpt-4"),
    Optional.of(0)
);

// Register handlers and connect
ws.onReceive(message -> System.out.println("Received: " + message.getAlpha()));
ws.onConnected(() -> System.out.println("Connected!"));
ws.connect().get();

// Send typed messages
ws.sendSend(SendEvent.builder()
    .sendText("Hello WebSocket!")
    .sendParam(42)
    .build());
```