| Name | Type | Description |
|---|---|---|
thread_id | str | None | Default: Noneoptional explicit thread identifier. Defaults to a fresh UUIDv4. |
assistant_id* | str | assistant the run will use. Required. |
headers | Mapping[str, str] | None | Default: None |
run_start_timeout | float | None | Default: None |
transport | Literal['sse', 'websocket'] | Default: 'sse' |
Open a v3 thread-centric streaming session.
When thread_id is None, a fresh UUIDv4 is minted client-side and
included in the URL of subsequent POST /threads/{thread_id}/...
calls. The server creates the thread row lazily on the first
run.start (internal server detail ā the SDK does not send any
if_not_exists flag). The v3 protocol response carries only
run_id, never thread_id ā that's why the SDK mints the id
client-side.
optional headers forwarded on every command and event request for this stream session.
optional seconds to wait for an in-flight
run.start before subscribing operations raise
asyncio.TimeoutError. Defaults to None (wait forever).
event transport to use ā "sse" (default) or
"websocket".