Repository navigation
Report conversation disconnection details - #907
Conversation
PR SummaryMedium Risk Overview Shutdown is centralized in Reviewed by Cursor Bugbot for commit 77e2107. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 6b943f7. Configure here.
…sconnect Aligns with onDisconnect in the JS, Kotlin, Swift, Flutter and Unity SDKs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ssion_end Restores the behaviour on main, where awaiting the session task raised on connection, initiation or audio start failures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks @gauravch-code! I pushed three commits on top:
One thing left for you: |
## Description Adds test coverage for elevenlabs 2.75.0, the latest release, alongside 2.70.0, the oldest supported version. Both are tested on Python 3.12, 3.13, 3.14 and 3.15. The integration needs no changes: every method it patches is unchanged in 2.75.0, and no new functionality is traced. 2.75.0 changes how Agents conversations shut down ([elevenlabs-python#907](elevenlabs/elevenlabs-python#907), [v2.75.0 release](https://github.com/elevenlabs/elevenlabs-python/releases/tag/v2.75.0)): - The SDK now sets its stop flag before cleanup. - A server-closed session now ends without calling `end_session()`. The existing aborted-shutdown test relies on the old order, so it now runs only on SDKs older than 2.75.0. Two new tests run the real SDK against a local WebSocket server and cover a server close and an aborted shutdown on both versions. ## Testing `scripts/run-tests` on all 8 `llmobs::elevenlabs` environments: - 2.70.0: 144 passed. - 2.75.0: 138 passed, 6 skipped (the version-gated test). `scripts/lint checks` passes. ## Risks None. The diff only touches tests and test metadata. ## Additional Notes No release note, because nothing users run changes (`changelog/no-changelog`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: william.conti <[email protected]>

Fixes #892
Adds an optional callback_disconnect(details) callback to Conversation and AsyncConversation. It reports whether the user, agent, or an error ended the session, along with received WebSocket close details and error messages.
Existing callback_end_session callbacks keep their zero-argument signature. Shutdown notifications run once, including during concurrent or reentrant shutdown.
Adds documentation and 39 regression tests covering normal/error closures, connection loss, setup failures, and callback behavior.