Skip to content

SDK v3: regeneration + hand-written migration (agents rename, orchestrator config, generated websocket clients) - #844

Open
fern-api[bot] wants to merge 7 commits into
nextfrom
fern-bot/2026-08-12_09-21-57_108
Open

SDK v3: regeneration + hand-written migration (agents rename, orchestrator config, generated websocket clients)#844
fern-api[bot] wants to merge 7 commits into
nextfrom
fern-bot/2026-08-12_09-21-57_108

Conversation

@fern-api

@fern-api fern-api Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Seed PR for the v3 major, targeting the protected next branch. Combines the fern-bot v3 regeneration (base commits) with the hand-written migration on top:

Regeneration (fern-python-sdk 4.64.1 → 5.27.1, --version 3.0.0a0):

  • conversational_aiagents namespace (URLs stay /v1/convai/*); new translate group
  • Generated websocket clients (client.speech_to_text.realtime(...), client.text_to_speech.realtime(...), sync + async)
  • python ^3.10 (drops 3.8/3.9), pydantic v2-only, idiomatic request names
  • All spec-deprecated endpoints removed (incl. cloud_storage_url on speech-to-text)

Hand-written commits on top:

  • Wrapper move: elevenlabs.conversational_ai.conversationelevenlabs.agents.conversation (+ default_audio_interface), .fernignore updated
  • Closes Align on-prem/orchestrator naming with JS SDK (breaking) #840: OnPremInitiationDataOrchestratorConfig, on_prem_configorchestrator_config, on_prem_conversation_urlurl (matches the JS client's reviewed OrchestratorConfig shape in feat(client): add self-hosted orchestrator session support packages#921); url now validated as ws:///wss://; optional fields keyword-only; wire format unchanged
  • Hand-written realtime clients deleted (realtime/, realtime_tts.py, speech_to_text_custom.py) in favor of the generated ones; client.py wrapper rewired
  • speech_engine/: .fernignore narrowed from whole-directory to the hand-written session/server/resource layer; generated REST + socket clients now live in the same package (vendored to match future regens); hand types.pysession_types.py
  • Stale replay.lock patch (fix: send list-of-primitive multipart fields as repeated form fields (#819) #825) pruned — the 5.x generator implements the multipart repeated-form-fields fix natively (its partial application had broken music/raw_client.py)
  • CI: python 3.8 → "3.10" (all jobs); test_ttv moved off removed create_previews; realtime STT tests deleted (⚠️ follow-up before beta: new tests against the generated socket clients)

Verification

  • mypy .: clean (2307 files)
  • tests/verify_types.py: pass
  • pytest: 155 passed; all 16 failures are live-API tests without ELEVENLABS_API_KEY locally (CI provides it)
  • Wire format compatibility: enclave_setup_config message and all URL construction unchanged (48 convai tests pass)

🤖 Generated with Claude Code


Note

Low Risk
Changes are documentation and codegen metadata only; no runtime SDK logic in this diff, though consumers upgrading will face breaking API changes covered by the skill.

Overview
This diff adds operator-facing migration guidance and regenerator metadata aligned with the broader v3 work described in the PR.

A new .agents/skills/elevenlabs:sdk-migration/SKILL.md documents how to move from Python SDK v2 to v3: conversational_aiagents, OnPremInitiationData / on_prem_configOrchestratorConfig / orchestrator_config, removed endpoints and renames, and replacing hand-written realtime APIs with generated WebSocket clients (speech_to_text.realtime, text_to_speech.realtime, etc.).

.fern/metadata.json is updated for a 3.0.0a0 regen: generator 4.64.1 → 5.27.1, should_generate_websocket_clients: true, explicit Pydantic v2 in generator config, removal of additional_init_exports for the old realtime package (no more root re-exports of ScribeRealtime, RealtimeConnection, etc.), and refreshed origin commit / version fields.

Reviewed by Cursor Bugbot for commit d02535c. Bugbot is set up for automated code reviews on this repo. Configure here.

fern-api Bot and others added 5 commits August 12, 2026 09:22
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-python-sdk: 5.27.1
Patches with unresolved conflicts (1):
  - patch-560b8934: fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825)
    Run `fern-replay resolve` to apply these customizations.
- elevenlabs.conversational_ai.conversation -> elevenlabs.agents.conversation
  (same for default_audio_interface); .fernignore updated separately
- OnPremInitiationData -> OrchestratorConfig, on_prem_config ->
  orchestrator_config, on_prem_conversation_url -> url (matching the JS
  client's OrchestratorConfig shape, closes #840); optional fields are now
  keyword-only and the url is validated to be ws:// or wss://
- wire format (enclave_setup_config) unchanged
- internal get_signed_url call moved to the agents group; async _ws
  annotation updated to the modern websockets ClientConnection type

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ients

- delete src/elevenlabs/realtime/, realtime_tts.py and the
  speech_to_text_custom wrapper: client.text_to_speech.realtime(...) and
  client.speech_to_text.realtime(...) are now generated (sync + async)
- narrow the speech_engine .fernignore entry from the whole directory to
  the hand-written session/server/resource layer only, so the generated
  REST + socket clients regenerate in place; hand-written types.py renamed
  to session_types.py to make room for the generated types/ package
- restore music/raw_client.py to pure generated output and prune the
  stale replay.lock patch (#825) — the 5.x generator implements the
  repeated-form-fields fix natively
- CI bumps python 3.8 -> 3.10 (quoted; unquoted 3.10 parses as 3.1)
- test_ttv switched from removed create_previews to design

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bot generation skipped speech_engine/ because the old .fernignore
ignored the whole directory. Vendor the generated client, raw_client,
socket_client and types/ (from a preview generation of the same spec) so
the package matches what future regens will produce in place, and merge
the generated socket exports (SendUpstreamMessage/ReceiveUpstreamMessage)
into the hand-maintained __init__.py.

mypy: clean over 2307 files. pytest: all failures are live-API tests
missing ELEVENLABS_API_KEY locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PaulAsjes PaulAsjes changed the title SDK regeneration SDK v3: regeneration + hand-written migration (agents rename, orchestrator config, generated websocket clients) Aug 12, 2026
@PaulAsjes PaulAsjes self-assigned this Aug 12, 2026
@PaulAsjes
PaulAsjes requested a balanced review from Copilot August 12, 2026 12:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

- sync regenerated websocket clients after the channel naming fix in
  elevenlabs-dx: text_to_speech.realtime is back (the multi-stream channel
  had silently clobbered it — the generators emit one socket client per
  group), multi-context websockets move to text_to_speech_multi_context /
  text_to_dialogue_multi_context
- add .agents/skills/elevenlabs:sdk-migration for agent-assisted v2->v3
  migrations, and ignore .agents/ in .fernignore

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6c7b144. Configure here.

Comment thread src/elevenlabs/text_to_speech_multi_context/client.py Outdated
Comment thread src/elevenlabs/text_to_speech/client.py
Two fern-python-sdk bugs, patched in place and carried forward by
fern-replay until fixed upstream:

- the TTS socket clients built ws_url as "/v1/text-to-speech/" — the
  {voice_id} path parameter and channel suffix (stream-input /
  multi-stream-input) were dropped, so connections targeted a
  non-existent path (reported by bugbot)
- every socket client passed the client's http(s) base URL straight to
  websockets.connect, which rejects non-ws schemes with InvalidURI —
  no generated realtime client could connect at all; the scheme is now
  converted to ws(s) at all 14 connect sites

Verified with mocked-connect URL assertions for all five products:
wss://api.elevenlabs.io/v1/text-to-speech/{voice_id}/stream-input etc.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants