Skip to content

Simplify the Text vs Voice split and auth - #233

Open
renal128 wants to merge 2 commits into
message-reconciliationfrom
sketch/conversation-auth
Open

Simplify the Text vs Voice split and auth#233
renal128 wants to merge 2 commits into
message-reconciliationfrom
sketch/conversation-auth

Conversation

@renal128

@renal128 renal128 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Voice goes through WebRTC, Text goes through Websocket.
Auth is transport-dependent - WebRTC and Websocket have different available auth methods (auth doc).
So the API was a bit awkward and the auth <> conversation type relationship wasn't properly enforced.

Now the API is cleaner:

  • we have ConversationAuth.Voice and ConversationAuth.TextOnly instead of a single ConversationCredential that had all available methods from both transport mixed in one enum
  • we have public startVoiceConversation(auth: ConversationAuth.Voice, ...) and startTextOnlyConversation(auth: ConversationAuth.TextOnly, ...) methods that enforce the modality and auth match

Test plan

  • swift test
  • swift test -Xswiftc -swift-version -Xswiftc 6
  • swiftformat . --strict
  • Widget modes using the shared auth types

Comment thread Sources/ElevenLabs/Internal/Conversation/Conversation.swift Outdated
@renal128
renal128 force-pushed the sketch/conversation-auth branch 2 times, most recently from 2cb84c7 to 64020ee Compare August 23, 2026 15:00
Comment thread Sources/ElevenLabs/Internal/Authorization/TokenService.swift
Comment thread Sources/ElevenLabs/Internal/Conversation/Conversation.swift
@renal128
renal128 force-pushed the sketch/conversation-auth branch from d50939f to e23333d Compare August 23, 2026 20:31
Comment thread Sources/ElevenLabs/Internal/Authorization/TokenService.swift
@renal128
renal128 force-pushed the sketch/conversation-auth branch 3 times, most recently from 2de232e to 36b4dc2 Compare August 23, 2026 20:50
… by transport.

Co-authored-by: Cursor <cursoragent@cursor.com>
@renal128
renal128 force-pushed the sketch/conversation-auth branch 2 times, most recently from d85d96a to a72eef5 Compare August 23, 2026 21:49

@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 1 potential issue.

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 a72eef5. Configure here.

Comment thread Sources/ElevenLabs/Internal/Authorization/TokenService.swift Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@renal128 renal128 changed the title Replace ConversationCredentials with ConversationAuth Simplify the Text vs Voice split and auth Aug 23, 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