feat(inference): handle preflight_transcript events in inference STT plugin#1228
Open
adrian-cowham wants to merge 2 commits intomainfrom
Open
feat(inference): handle preflight_transcript events in inference STT plugin#1228adrian-cowham wants to merge 2 commits intomainfrom
adrian-cowham wants to merge 2 commits intomainfrom
Conversation
…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 detectedLatest commit: ce68fcd The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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 |
Add a changeset for handling preflight_transcript events in the inference STT plugin.
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.
Summary
sttPreflightTranscriptEventSchemaZod schema and updates thesttServerEventSchemadiscriminated union to parsepreflight_transcriptwire events from the agent-gateway (AP-646)processTranscriptfromisFinal: booleantoeventType: SpeechEventTypeto naturally support three transcript states (interim, final, preflight), matching the Deepgram direct plugin's#sendTranscriptEventpatterneager_eot_thresholdtoDeepgramOptionsso users can enable Deepgram Flux turn-detection events that produce preflight transcriptsCloses AJS-386
Test plan
pnpm build:agentscompiles successfullypnpm api:check— no public API surface changes (types are internal)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)restaurant_agent.tsusing Deepgram Flux model +eager_eot_thresholdset🤖 Generated with Claude Code