fix(passthrough): match deepgram listen routes served under a path prefix

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yassin 2026-09-18 19:06:24 +00:00
parent aeca6ed7ba
commit 84f7adec2e
2 changed files with 2 additions and 1 deletions

View file

@ -57,7 +57,7 @@ class DeepgramListenPassthroughLoggingHandler:
@staticmethod
def is_deepgram_listen_route(url_route: str) -> bool:
path: Final = urlparse(url_route).path
return path.startswith("/deepgram/") and path.endswith(DEEPGRAM_LISTEN_ROUTE_SUFFIX)
return "/deepgram/" in path and path.endswith(DEEPGRAM_LISTEN_ROUTE_SUFFIX)
def deepgram_listen_passthrough_handler(
self,

View file

@ -42,6 +42,7 @@ def _metadata(duration: object, channels: int = 1) -> dict[str, object]:
("/deepgram/v1/listen", True),
("/deepgram/listen", True),
("/deepgram/v1/listen?model=nova-3", True),
("/litellm/deepgram/v1/listen", True),
("/deepgram/v1/speak", False),
("/deepgram/v1/listen/extra", False),
("/openai/v1/realtime", False),