Fix(inworld): "Context not found" errors caused by invalid enum parameter types#5153
Merged
davidzhao merged 2 commits intolivekit:mainfrom Mar 19, 2026
Merged
Fix(inworld): "Context not found" errors caused by invalid enum parameter types#5153davidzhao merged 2 commits intolivekit:mainfrom
davidzhao merged 2 commits intolivekit:mainfrom
Conversation
* to prevent invalid fields to be sent over the websocket * also add handling of errors at response's top level * changes default temperature to 1.0
7bc84ec to
3114352
Compare
Contributor
Author
|
The validation might be a bit paranoid. logging of the error message might be sufficient for developers to understand what's wrong |
davidzhao
approved these changes
Mar 19, 2026
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.
Passing non-string values (e.g.
text_normalization=Trueinstead of"ON") silently produced malformed WebSocket messages that the API gateway rejected, while subsequent messages for the same context passed through — resulting in "Context not found" errors with no actionable logging.Changes:
encoding,timestamp_type,text_normalization, andtimestamp_transport_strategy— raisesValueErrorimmediately on invalid values{"error": ...}) in the WebSocket receive loop instead of silently dropping themFixes #5103