fix(inference): update tts event name and drop unkown type warning#1354
fix(inference): update tts event name and drop unkown type warning#1354toubatbrian merged 5 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: c626f91 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 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 |
Update TTS event name and remove unknown type warning in inference.
There was a problem hiding this comment.
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.
Description
update tts event name and drop unkown type warning
Changes Made
Pre-Review Checklist
Testing
restaurant_agent.tsandrealtime_agent.tswork 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.