From 5ee8c568996195b8ac9f2b68940b45cbade3b7f3 Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Wed, 5 Nov 2025 17:36:24 -0300 Subject: [PATCH] Fixing the runner start endpoint when enableDefaultIceServers is enabled. --- src/pipecat/runner/run.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pipecat/runner/run.py b/src/pipecat/runner/run.py index 897d40fdc..55c70ed8a 100644 --- a/src/pipecat/runner/run.py +++ b/src/pipecat/runner/run.py @@ -74,7 +74,7 @@ import uuid from contextlib import asynccontextmanager from http import HTTPMethod from pathlib import Path -from typing import Any, Dict, List, Optional, TypedDict +from typing import Any, Dict, List, Optional, TypedDict, Union import aiohttp from fastapi.responses import FileResponse, Response @@ -205,7 +205,7 @@ def _setup_webrtc_routes( try: from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI - from pipecat.transports.smallwebrtc.connection import IceServer, SmallWebRTCConnection + from pipecat.transports.smallwebrtc.connection import SmallWebRTCConnection from pipecat.transports.smallwebrtc.request_handler import ( IceCandidate, SmallWebRTCPatchRequest, @@ -216,6 +216,9 @@ def _setup_webrtc_routes( logger.error(f"WebRTC transport dependencies not installed: {e}") return + class IceServer(TypedDict, total=False): + urls: Union[str, List[str]] + class IceConfig(TypedDict): iceServers: List[IceServer]