SDK v3: regeneration + hand-written migration (agents rename, orchestrator config, generated websocket clients) - #844
Open
fern-api[bot] wants to merge 7 commits into
Open
Conversation
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 5.27.1
- 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>
- 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>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Seed PR for the v3 major, targeting the protected
nextbranch. 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_ai→agentsnamespace (URLs stay/v1/convai/*); newtranslategroupclient.speech_to_text.realtime(...),client.text_to_speech.realtime(...), sync + async)^3.10(drops 3.8/3.9), pydantic v2-only, idiomatic request namescloud_storage_urlon speech-to-text)Hand-written commits on top:
elevenlabs.conversational_ai.conversation→elevenlabs.agents.conversation(+default_audio_interface),.fernignoreupdatedOnPremInitiationData→OrchestratorConfig,on_prem_config→orchestrator_config,on_prem_conversation_url→url(matches the JS client's reviewedOrchestratorConfigshape in feat(client): add self-hosted orchestrator session support packages#921); url now validated asws:///wss://; optional fields keyword-only; wire format unchangedrealtime/,realtime_tts.py,speech_to_text_custom.py) in favor of the generated ones;client.pywrapper rewiredspeech_engine/:.fernignorenarrowed 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); handtypes.py→session_types.pymusic/raw_client.py)test_ttvmoved off removedcreate_previews; realtime STT tests deleted (Verification
mypy .: clean (2307 files)tests/verify_types.py: passpytest: 155 passed; all 16 failures are live-API tests withoutELEVENLABS_API_KEYlocally (CI provides it)enclave_setup_configmessage 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.mddocuments how to move from Python SDK v2 to v3:conversational_ai→agents,OnPremInitiationData/on_prem_config→OrchestratorConfig/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.jsonis 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 ofadditional_init_exportsfor the oldrealtimepackage (no more root re-exports ofScribeRealtime,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.