Skip to content

feat(inference): handle preflight_transcript events in inference STT plugin#1228

Open
adrian-cowham wants to merge 2 commits intomainfrom
adrian-cowham/preflight-transcripts
Open

feat(inference): handle preflight_transcript events in inference STT plugin#1228
adrian-cowham wants to merge 2 commits intomainfrom
adrian-cowham/preflight-transcripts

Conversation

@adrian-cowham
Copy link
Copy Markdown
Contributor

Summary

  • Adds sttPreflightTranscriptEventSchema Zod schema and updates the sttServerEventSchema discriminated union to parse preflight_transcript wire events from the agent-gateway (AP-646)
  • Refactors processTranscript from isFinal: boolean to eventType: SpeechEventType to naturally support three transcript states (interim, final, preflight), matching the Deepgram direct plugin's #sendTranscriptEvent pattern
  • Adds eager_eot_threshold to DeepgramOptions so users can enable Deepgram Flux turn-detection events that produce preflight transcripts

Closes AJS-386

Test plan

  • pnpm build:agents compiles successfully
  • pnpm api:check — no public API surface changes (types are internal)
  • Reviewed for behavioral parity with plugins/deepgram/src/stt_v2.ts (EagerEndOfTurn → PREFLIGHT_TRANSCRIPT mapping, START_OF_SPEECH gating, empty text guard, no END_OF_SPEECH/RECOGNITION_USAGE on preflight)
  • Verify with restaurant_agent.ts using Deepgram Flux model + eager_eot_threshold set

🤖 Generated with Claude Code

…plugin

The agent-gateway now sends preflight_transcript wire events for Deepgram
Flux turn-detection (EagerEndOfTurn). This adds Zod schema parsing and
SpeechEventType.PREFLIGHT_TRANSCRIPT emission to the inference STT plugin,
matching the behavior of the Deepgram direct plugin (stt_v2.ts). Also
exposes eager_eot_threshold in DeepgramOptions so users can enable the
turn-detection events that produce preflight transcripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: ce68fcd

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

This PR includes changesets to release 22 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai 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

Copy link
Copy Markdown
Contributor

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

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

Add a changeset for handling preflight_transcript events in the inference STT plugin.
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