Repository navigation
fix(conv): give voice calls the per-channel descriptor - #1318
Merged
Merged
Conversation
Phone calls on Threll and Vapi, and widget calls, now get the same [Channel] block text conversations get: the channel's name and id plus its agent-runtime/channel-<id> descriptor. A widget call uses the widget channel's descriptor rather than the voice channel's, so a shared voice channel still answers for the site the call came from. Co-Authored-By: Claude Opus 5.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.
Problem
skill://conv/serve-multiple-sitessays email, SMS and voice channels can all carry per-site bindings, and that the agent reads a per-channel descriptor (agent-runtime/channel-<channel id>). Only the text agent read that descriptor (conversation-handler.ts). The voice prompt built incomposeVoiceSystemPromptincluded neither it nor the channel name. An org running several sites could pin each voice channel's KB spaces and store connections, but the voice agent was never told which site the call was for.Change
loadVoiceChannelContextreads the descriptor and builds the same[Channel]block the text agent uses. If the read fails, the block still names the channel and the call goes ahead.composeVoiceSystemPromptnow takes any number of context blocks. Order: voice system prompt, company context,[Channel], then caller or language context.serve-multiple-sites.mdnow describes voice behaviour.Tests
vapi-assistant.test.ts): block formatting, the slug lookup, a failed read, and the order of the composed prompt.worker_requestincludes the voice channel's descriptor. A widget voice start includes the widget channel's descriptor and not the voice channel's.Related
Independent of #1317. After both merge, the "What the voice agent is told" section that #1317 adds to
setup-voice-sms-channel.mdshould mention the[Channel]block. Whichever PR lands second can add that line.🤖 Generated with Claude Code