fix(amd): resolve transcript-only greetings at eot - #2400
Open
rosetta-livekit-bot[bot] wants to merge 2 commits into
Open
fix(amd): resolve transcript-only greetings at eot#2400rosetta-livekit-bot[bot] wants to merge 2 commits into
rosetta-livekit-bot[bot] wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: e499f32 The changes in this PR will be included in the next version bump. This PR includes changesets to release 39 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 |
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.
Ports livekit/agents#7026.
Summary
nullAMD models to reuse session LLM/STT while omitted options retain cloud auto-selectionnulloption APITesting
pnpm test agents(142 files, 2,330 passed, 5 skipped)pnpm build:agentspnpm --filter @livekit/agents lintpnpm --filter @livekit/agents typecheckcue-clivoice-mode run asserting oneAMD_HUMANframework event with a non-empty final transcript while usingllm: nullandstt: nullSource diff coverage
livekit-agents/livekit/agents/voice/amd/classifier.py: adapted toagents/src/voice/amd.tsbecause JS consolidates classifier and detector logic. Ported the EOT fallback that satisfies the silence gate only when VAD has no valid speech end. Transcript preservation was already implemented in JS and is retained and covered.livekit-agents/livekit/agents/voice/amd/detector.py: adapted toagents/src/voice/amd.ts, with the public signature reflected inagents/etc/agents.api.md. Python explicitNonemaps to TypeScriptnull; PythonNOT_GIVENmaps to omitted/undefined, preserving cloud auto-selection. Python-specificNotGivenOrandis_giveninfrastructure is not applicable in TypeScript.tests/test_amd_classifier.py: adapted toagents/src/voice/amd.test.ts, the consolidated JS AMD suite. Ported timeout transcript preservation, transcript-only human and machine EOT resolution, and latest-transcript-chunk behavior. Existing equivalent timer and lifecycle coverage remains in place.tests/test_amd_detector.py: adapted toagents/src/voice/amd.test.tsbecause JS has no separate detector class or detector test module. Ported the new omitted/null/explicit model-resolution matrix; tests moved unchanged into the new Python file already had equivalents in the existing JS suite, so the Python-only file split is not applicable.No source behavior or target counterpart was omitted, and no infrastructure gap remains.
Ported from livekit/agents#7026
Original PR description
Problem: AMD can receive final transcripts without VAD boundaries. Its LLM verdict then remains behind the silence gate until the detection timeout.
Behavior: The existing transcript EOT backstop now supplies the missing silence signal only when no valid VAD end exists. None reuses session STT or LLM models, while omitted values keep cloud defaults. Timeout verdicts retain the transcript.
Fixes #6996
Addresses AGT-3382
Initial prompt and agent context
Model: GPT-5.6