Skip to content

fix(inference): update tts event name and drop unkown type warning#1354

Merged
toubatbrian merged 5 commits intomainfrom
chenghao/fix/inference-unk-types
May 1, 2026
Merged

fix(inference): update tts event name and drop unkown type warning#1354
toubatbrian merged 5 commits intomainfrom
chenghao/fix/inference-unk-types

Conversation

@chenghao-mou
Copy link
Copy Markdown
Member

@chenghao-mou chenghao-mou commented Apr 30, 2026

Description

update tts event name and drop unkown type warning

Changes Made

  • update tts event name
  • drop unkown type warning
  • align stt and tts schema handling

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title, or explanations provided for why they're included
  • Video demo: A small video demo showing changes works as expected and did not break any existing functionality using Agent Playground (if applicable)

Testing

  • Automated tests added/updated (if applicable)
  • All tests pass
  • Make sure both restaurant_agent.ts and realtime_agent.ts work properly (for major changes)

Tested locally with a local Inference gateway and the basic agent. with or without timestamps are both working.

Additional Notes


Note to reviewers: Please ensure the pre-review checklist is completed before starting your review.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: c626f91

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

This PR includes changesets to release 28 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai 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-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-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral 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-runway 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

Update TTS event name and remove unknown type warning in inference.
@chenghao-mou chenghao-mou requested a review from a team April 30, 2026 17:03
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 found 1 potential issue.

🐛 1 issue in files not directly in the diff

🐛 Test file not updated after output_timestamps→output_alignment rename causes test failure (agents/src/inference/api_protos.test.ts:58-66)

The test rejects malformed output_timestamps entries at agents/src/inference/api_protos.test.ts:58-66 will now fail. Since output_timestamps was renamed to output_alignment in the schema, output_timestamps is no longer in knownTtsServerEventTypes (agents/src/inference/api_protos.ts:92-99). When ttsServerEventSchema.safeParse(...) receives { type: 'output_timestamps', ... }, the known schema rejects it (no literal match), but ttsUnknownServerEventSchema accepts it because output_timestamps passes the refine check and .passthrough() doesn't validate inner fields like words. So result.success is true, but the test asserts false. The other two output_timestamps tests (lines 20-56) coincidentally still pass but now test unknown-event passthrough instead of known-event field extraction — they should also be updated to use output_alignment.

View 4 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@toubatbrian toubatbrian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@toubatbrian toubatbrian merged commit a9d4422 into main May 1, 2026
9 checks passed
@toubatbrian toubatbrian deleted the chenghao/fix/inference-unk-types branch May 1, 2026 03:56
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