Skip to content

fix(amd): resolve transcript-only greetings at eot - #2400

Open
rosetta-livekit-bot[bot] wants to merge 2 commits into
mainfrom
censers-tabbed-orioles
Open

fix(amd): resolve transcript-only greetings at eot#2400
rosetta-livekit-bot[bot] wants to merge 2 commits into
mainfrom
censers-tabbed-orioles

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Ports livekit/agents#7026.

Summary

  • resolve transcript-only human and machine greetings at the endpointing backstop when VAD does not provide a valid speech end
  • allow explicit null AMD models to reuse session LLM/STT while omitted options retain cloud auto-selection
  • preserve accumulated transcripts in timeout verdicts and add the source regression/configuration coverage
  • update the public API report and add a minor changeset for the new null option API

Testing

  • pnpm test agents (142 files, 2,330 passed, 5 skipped)
  • pnpm build:agents
  • pnpm --filter @livekit/agents lint
  • pnpm --filter @livekit/agents typecheck
  • Prettier check on all changed source, test, and changeset files
  • cue-cli voice-mode run asserting one AMD_HUMAN framework event with a non-empty final transcript while using llm: null and stt: null
Source diff coverage
  • livekit-agents/livekit/agents/voice/amd/classifier.py: adapted to agents/src/voice/amd.ts because 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 to agents/src/voice/amd.ts, with the public signature reflected in agents/etc/agents.api.md. Python explicit None maps to TypeScript null; Python NOT_GIVEN maps to omitted/undefined, preserving cloud auto-selection. Python-specific NotGivenOr and is_given infrastructure is not applicable in TypeScript.
  • tests/test_amd_classifier.py: adapted to agents/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 to agents/src/voice/amd.test.ts because 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

Can you investigate livekit/agents#6996?

Yeah, EOT sounds good.

we could have None means session STT or LLM, so NOT_GIVEN -> default, None -> Inherit, explicit -> explicit.

Yeah, we should preserve the transcript and add tests against the regression cases.

but eot requires VAD too, right?

yes please.

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from a team as a code owner September 1, 2026 10:49
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e499f32

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 Minor
@livekit/agents-plugin-anam Minor
@livekit/agents-plugin-anthropic Minor
@livekit/agents-plugin-assemblyai Minor
@livekit/agents-plugin-azure Minor
@livekit/agents-plugin-baseten Minor
@livekit/agents-plugin-bey Minor
@livekit/agents-plugin-cartesia Minor
@livekit/agents-plugin-cerebras Minor
@livekit/agents-plugin-deepgram Minor
@livekit/agents-plugin-did Minor
@livekit/agents-plugin-elevenlabs Minor
@livekit/agents-plugin-fishaudio Minor
@livekit/agents-plugin-google Minor
@livekit/agents-plugin-hedra Minor
@livekit/agents-plugin-hume Minor
@livekit/agents-plugin-inworld Minor
@livekit/agents-plugin-krisp Minor
@livekit/agents-plugin-lemonslice Minor
@livekit/agents-plugin-liveavatar Minor
@livekit/agents-plugin-livekit Minor
@livekit/agents-plugin-minimax Minor
@livekit/agents-plugin-mistral Minor
@livekit/agents-plugin-mistralai Minor
@livekit/agents-plugin-neuphonic Minor
@livekit/agents-plugin-openai Minor
@livekit/agents-plugin-perplexity Minor
@livekit/agents-plugin-phonic Minor
@livekit/agents-plugin-protoface Minor
@livekit/agents-plugin-resemble Minor
@livekit/agents-plugin-rime Minor
@livekit/agents-plugin-runway Minor
@livekit/agents-plugin-sarvam Minor
@livekit/agents-plugin-silero Minor
@livekit/agents-plugin-soniox Minor
@livekit/agents-plugin-tavus Minor
@livekit/agents-plugins-test Minor
@livekit/agents-plugin-trugen Minor
@livekit/agents-plugin-xai Minor

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

@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 bugs or issues to report.

Devin Review

@chenghao-mou chenghao-mou self-assigned this Sep 4, 2026
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