langchain-ai/langgraph · error · ValueError
transport must be 'sse' or 'websocket'.
Error message
transport must be 'sse' or 'websocket'.
What it means
Error "transport must be 'sse' or 'websocket'." thrown in langchain-ai/langgraph.
Source
Thrown at libs/sdk-py/langgraph_sdk/_async/threads.py:774
client-side.
Args:
thread_id: optional explicit thread identifier. Defaults to a
fresh UUIDv4.
assistant_id: assistant the run will use. Required.
headers: optional headers forwarded on every command and event
request for this stream session.
run_start_timeout: optional seconds to wait for an in-flight
`run.start` before subscribing operations raise
`asyncio.TimeoutError`. Defaults to `None` (wait forever).
transport: event transport to use — `"sse"` (default) or
`"websocket"`.
Returns:
An `AsyncThreadStream` to use as an async context manager.
"""
if transport not in ("sse", "websocket"):
raise ValueError("transport must be 'sse' or 'websocket'.")
return AsyncThreadStream(
http=self.http,
thread_id=thread_id if thread_id is not None else str(uuid.uuid4()),
assistant_id=assistant_id,
headers=headers,
run_start_timeout=run_start_timeout,
explicit_thread_id=thread_id is not None,
transport_kind=transport,
)
async def join_stream(
self,
thread_id: str,
*,
last_event_id: str | None = None,
stream_mode: ThreadStreamMode | Sequence[ThreadStreamMode] = "run_modes",
headers: Mapping[str, str] | None = None,
params: QueryParamTypes | None = None,View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/sdk-py/langgraph_sdk/_async/threads.py:774 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/e4865edc77a661cb.
Report an issue: GitHub.