From 360b5310c004db8fd436441faa120467a760c82a Mon Sep 17 00:00:00 2001 From: Josh Park <50765702+JoshParkSJ@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:41:58 -0400 Subject: [PATCH] refactor: narrow voice_mode to Literal["session"] The legacy "1 job per tool call" / "1 job per agent config" voice paths have been removed in uipath-agents-python's VoiceJobRuntime. The only remaining voice mode is "session" (long-lived URT job that streams tool calls over socket.io to CAS). Narrow voice_mode accordingly so dead literals don't propagate into runtime callers. --- src/uipath/runtime/context.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/uipath/runtime/context.py b/src/uipath/runtime/context.py index c77ceb0..4dad0ed 100644 --- a/src/uipath/runtime/context.py +++ b/src/uipath/runtime/context.py @@ -37,8 +37,13 @@ class UiPathRuntimeContext(BaseModel): ) exchange_id: str | None = Field(None, description="Exchange identifier for CAS") message_id: str | None = Field(None, description="Message identifier for CAS") - voice_mode: Literal["config", "toolCall"] | None = Field( - None, description="Voice job type for CAS" + voice_mode: Literal["session"] | None = Field( + None, + description=( + "Set when this job hosts a voice agent session. " + "Only 'session' is supported; the runtime factory uses its presence " + "to dispatch to the voice runtime." + ), ) mcp_server_id: str | None = None mcp_server_slug: str | None = None