Skip to content

feat(phonic): add phonic_model option to select the phonic model version - #7393

Merged
tinalenguyen merged 1 commit into
livekit:mainfrom
Phonic-Co:arun/phonic-model-version
Sep 22, 2026
Merged

tinalenguyen merged 1 commit into
livekit:mainfrom
Phonic-Co:arun/phonic-model-version

Conversation

@arunwpm-work

Copy link
Copy Markdown
Contributor

Adds an optional phonic_model option (phonic_v0_5 / phonic_v1 / phonic_v1_1) sent as the phonic_model config field so callers can select the Phonic model version. Threaded like the existing config options (e.g. enable_redaction), and requires phonic>=0.32.34, which types phonic_model on the realtime config. Defaults server-side to phonic_v0_5 when omitted.

Adds an optional phonic_model option (phonic_v0_5 / phonic_v1 / phonic_v1_1) sent as the
phonic_model config field so callers can select the Phonic model version. Threaded like the
existing config options (e.g. enable_redaction), and requires phonic>=0.32.34, which types
phonic_model on the realtime config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arunwpm-work
arunwpm-work force-pushed the arun/phonic-model-version branch from bd33e87 to dbce96c Compare September 22, 2026 07:18
@arunwpm-work
arunwpm-work marked this pull request as ready for review September 22, 2026 07:31
@arunwpm-work
arunwpm-work requested a review from a team as a code owner September 22, 2026 07:31

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

no_input_end_conversation_sec=no_input_end_conversation_sec,
websocket_timeout_sec=websocket_timeout_sec,
intelligence_level=intelligence_level,
phonic_model=phonic_model,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Model updates miss concurrent sessions

With multiple sessions, update_options(phonic_model=...) resets only the first iterated session. Every session aliases _opts, so the first update makes remaining changed checks fail. Those conversations keep their old model while local config reports the new one.

Learn more

Each RealtimeSession stores the model's _RealtimeOptions object by reference in RealtimeSession.__init__. The model then calls each session's update_options, but the first call mutates that shared object. Later sessions compare against the already-updated value in RealtimeSession.update_options and return without scheduling a reset. Their Phonic connections therefore retain the previous model even though all session objects now read the new option.

Example: A model owns sessions A and B, both connected with phonic_v0_5. Calling model.update_options(phonic_model="phonic_v1") updates the shared object while visiting A. A resets, but B sees phonic_v1 == phonic_v1 and skips its reset, so B continues using phonic_v0_5 remotely.

Recommended fix: Give each session an independent options snapshot, or apply model-level changes once and explicitly schedule a reset for every active session without relying on each session's shared-state comparison. Preserve the updated model defaults for sessions created afterward.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@tinalenguyen
tinalenguyen merged commit 74689b1 into livekit:main Sep 22, 2026
17 checks passed
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