Skip to content

plugins/phonic: add configsForTools for per-tool behavior overrides - #2183

Open
arunwpm-work wants to merge 7 commits into
livekit:mainfrom
Phonic-Co:arun/phonic-configs-for-tools-upstream
Open

plugins/phonic: add configsForTools for per-tool behavior overrides#2183
arunwpm-work wants to merge 7 commits into
livekit:mainfrom
Phonic-Co:arun/phonic-configs-for-tools-upstream

Conversation

@arunwpm-work

Copy link
Copy Markdown
Contributor

What

Adds configsForTools to the Phonic realtime model — per-tool behavior overrides forwarded to Phonic's tool config. One entry per tool (keyed by name); each may set require_speech_before_tool_call, forbid_speech_after_tool_call, and forbid_tool_call_after_speech. Omitted fields fall back to the plugin defaults; tools with no entry are unchanged. wait_for_speech_before_tool_call (on) and allow_tool_chaining (off) remain fixed by the plugin.

This generalizes the existing forbidSpeechAfterToolCall: string[] option into a single per-tool config object, and adds forbid_tool_call_after_speech (drop a tool call if the agent already spoke that turn). See the plugin README for the field reference. Changeset included.

arunwpm-work and others added 6 commits June 17, 2026 16:07
…ll_after_speech)

Replace the forbidSpeechAfterToolCall: string[] option with configsForTools:
PhonicToolConfig[] — one object per tool ({ name, ... }) carrying up to the full
behavior set (wait_for_speech_before_tool_call, forbid_speech_after_tool_call,
forbid_tool_call_after_speech, allow_tool_chaining); omitted fields fall back to the
plugin defaults. The plugin forwards each object as the tool's Phonic tool_config
(passthrough, snake_case keys) and reads forbid_speech_after_tool_call for its own
assistant-turn logic.

Adds forbid_tool_call_after_speech (echo drops the tool call if the agent spoke that
turn). Supersedes the un-PR'd arun/phonic-forbid-speech-after-tool-call branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the remaining per-tool field (require_speech_before_tool_call) and move the
per-field behavior docs out of inline comments/JSDoc into the plugin README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…configurable

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nto arun/phonic-configs-for-tools-upstream

# Conflicts:
#	plugins/phonic/README.md
#	plugins/phonic/src/realtime/realtime_model.ts
@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d90c3d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@livekit/agents-plugin-phonic Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-anthropic Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-azure Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-did Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-krisp Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-perplexity Patch
@livekit/agents-plugin-protoface Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-soniox Patch
@livekit/agents-plugin-tavus Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch
@livekit/agents-plugins-test Patch

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

@arunwpm-work
arunwpm-work marked this pull request as ready for review July 31, 2026 00:32
@arunwpm-work
arunwpm-work requested a review from a team as a code owner July 31, 2026 00:32

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Re-add the removed forbidSpeechAfterToolCall: string[] option for backwards
compatibility. It logs a deprecation warning and folds each listed tool into
configsForTools (an explicit configsForTools entry wins).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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