fix(phonic): reuse realtime session across handoffs#1838
fix(phonic): reuse realtime session across handoffs#1838rosetta-livekit-bot[bot] wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 4f2eea2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| }), | ||
| audio_speed: this.options.audioSpeed, | ||
| tools: toolsPayload, | ||
| ...(toolsPayload.length > 0 && { tools: toolsPayload }), |
There was a problem hiding this comment.
🚩 Conditional tools field omission changes reset semantics
In the new buildConfigOptions at line 860, tools is only included when toolsPayload.length > 0. The old code always sent tools (even as []) in both the initial config and reset messages. This is a semantic change: when an agent with no tools takes over during a handoff, the reset config will omit the tools field entirely rather than sending tools: []. Whether this correctly clears old tools depends on how the Phonic server interprets a reset with a missing tools field — as "no tools" (full replacement) vs "keep existing tools" (partial update). Since the message type is reset and the config includes all other fields unconditionally, full replacement seems intended, but this should be verified against the Phonic API docs.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Testing
Ported from livekit/agents#6163
Original PR description
already supported in JS