Skip to content

feat(regen): Speak V2 TTS websocket, agent update-listen, Flux EOT tuning#742

Open
GregHolmes wants to merge 6 commits into
mainfrom
gh/sdk-gen-2026-07-08
Open

feat(regen): Speak V2 TTS websocket, agent update-listen, Flux EOT tuning#742
GregHolmes wants to merge 6 commits into
mainfrom
gh/sdk-gen-2026-07-08

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fern SDK regeneration (2026-07-08). Pulls in new generator output, re-applies the hand-maintained patches, extends the socket-client convention to the new client, and adds test + example coverage for the new surface.

New public surface (Fern-generated this regen)

  • Speak V2 — Flux TTS WebSocket (client.speak.v2.connect(...)): new speak/v2/ package (client, socket client, request/response types) plus top-level SpeakV2Encoding/MipOptOut/Model/SampleRate/Tag.
  • Agent mid-session listen reconfigure: send_update_listen(...) with AgentV1UpdateListen/AgentV1UpdateListenListen, and the AgentV1ListenUpdated server acknowledgement.
  • Flux end-of-turn tuning fields on the listen providers: eot_threshold, eager_eot_threshold, eot_timeout_ms.

Manual-patch reconciliation

The generator caught up on none of the existing back-compat concerns, so all 25 frozen patches were re-applied (nothing dropped from .fernignore), preserving the new generator additions:

  • Legacy alias re-exports merged back into the package __init__.py files (kept alongside the new SpeakV2* / AgentV1* entries).
  • language_hintlanguage_hints migration shim re-added to the three listen-provider models (kept alongside the new eot_* fields).
  • Agent socket client: _sanitize_numeric_types, broad except Exception, optional send_keep_alive (kept the new send_update_listen).
  • listen/v1, listen/v2, speak/v1 socket clients, query_encoder bool coercion, agent_v1settings* back-compat, create-key alias + wire test — all restored.

Judgment call — listen/v2 send_configure shim: kept

The generator now emits complete ListenV2Configure/ListenV2ConfigureSuccess models, but adopting them changes the public signature (raw dict → model, typed responses) — a breaking change. The typing.Any shim is kept for this maintenance regen; typed-model adoption is deferred to a future major/minor.

New: Speak V2 socket-client patch

The newly generated speak/v2/socket_client.py was made consistent with the other four socket clients and frozen:

  • Broad except Exception (preserves the custom-transport error contract — a transport can raise arbitrary types; the narrow generated catch would leak them past the message loop).
  • Optional send_flush() / send_close() for no-payload control messages (parity with speak/v1).

Test & example coverage

  • tests/custom/test_speak_v2_socket.py — send serialization, response-type parsing, broad-except error emission.
  • tests/custom/test_eot_thresholds_feature.pyeot_* fields serialize on all three listen providers.
  • tests/custom/test_agent_update_listen.pysend_update_listen serialization + AgentV1ListenUpdated resolution.
  • tests/manual/speak/v2/connect/ — standalone scripts (main / async / with_auth_token / with_raw_response), parity with speak/v1.
  • examples/25-text-to-speech-streaming-v2.py (+ examples/README.md entry).
  • reference.md — new "Speak V2 Connect" section and send_update_listen added to the Agent V1 send methods.

Verification

  • mypy src/ — clean (844 files)
  • mypy tests/typecheck — clean
  • pytest — 318 passed, 1 skipped
  • ruff check src — clean (new test/example/manual files add no new warnings)

Known limitation

Live end-to-end testing of Speak V2 is deferred: /v2/speak (Flux) currently returns HTTP 400 at the handshake, consistent with the endpoint not yet being publicly available / enabled. The SDK builds the correct, spec-conformant request (verified), and the unit tests validate client behavior without the live endpoint. The manual scripts are ready for the live check once Flux is enabled.

fern-api Bot and others added 4 commits July 8, 2026 15:19
…nce.md

Apply the socket-client patch convention to the newly generated
speak/v2/socket_client.py so it is consistent with the other four
clients: broad `except Exception` (custom-transport error contract)
and optional `send_flush()`/`send_close()` for no-payload control
messages. Freeze it in .fernignore and add regression coverage.

Document the new Speak V2 WebSocket in reference.md and add
send_update_listen to the Agent V1 send-methods section.
…fields

Cover the functionality introduced by the 2026-07-08 regen that shipped
with only indirect coverage:

- tests/custom/test_speak_v2_socket.py: Speak V2 send serialization,
  response-type parsing, and broad-except error-emit behavior.
- tests/custom/test_eot_thresholds_feature.py: eot_threshold /
  eager_eot_threshold / eot_timeout_ms serialize on the three listen
  providers (mirrors test_language_hints_feature.py).
- tests/custom/test_agent_update_listen.py: send_update_listen
  serialization + AgentV1ListenUpdated response resolution.
- tests/manual/speak/v2/connect/: standalone connect scripts (main,
  async, with_auth_token, with_raw_response), parity with speak/v1.
- examples/25-text-to-speech-streaming-v2.py: Speak V2 streaming example.

Freeze the three new custom tests in .fernignore.
@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-07-08 feat(regen): Speak V2 TTS websocket, agent update-listen, Flux EOT tuning Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant