Skip to content

Fix(inworld): "Context not found" errors caused by invalid enum parameter types#5153

Merged
davidzhao merged 2 commits intolivekit:mainfrom
inworld-ai:ian/inworld-enums
Mar 19, 2026
Merged

Fix(inworld): "Context not found" errors caused by invalid enum parameter types#5153
davidzhao merged 2 commits intolivekit:mainfrom
inworld-ai:ian/inworld-enums

Conversation

@ianbbqzy
Copy link
Contributor

@ianbbqzy ianbbqzy commented Mar 18, 2026

Passing non-string values (e.g. text_normalization=True instead 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:

  • Add runtime validation for encoding, timestamp_type, text_normalization, and timestamp_transport_strategy — raises ValueError immediately on invalid values
  • Handle gateway-level error responses ({"error": ...}) in the WebSocket receive loop instead of silently dropping them
  • Add logging for context lifecycle and error diagnostics
  • Change default temperature to 1.0

Fixes #5103

devin-ai-integration[bot]

This comment was marked as resolved.

* 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
@ianbbqzy ianbbqzy force-pushed the ian/inworld-enums branch from 7bc84ec to 3114352 Compare March 18, 2026 23:41
@ianbbqzy
Copy link
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 davidzhao merged commit c88b6a3 into livekit:main Mar 19, 2026
10 checks passed
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.

Inworld: Context not found

2 participants