diff --git a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py index f09143e4a7e..74491f283a1 100644 --- a/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py +++ b/litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py @@ -205,8 +205,13 @@ class AssemblyAIPassthroughLoggingHandler: if _api_key is None: raise ValueError("AssemblyAI API key not found") try: - if any(c in transcript_id for c in ("/", "\\", "#", "?")) or ".." in transcript_id: - raise ValueError(f"Invalid transcript_id {transcript_id!r}: contains disallowed characters") + if ( + any(c in transcript_id for c in ("/", "\\", "#", "?")) + or ".." in transcript_id + ): + raise ValueError( + f"Invalid transcript_id {transcript_id!r}: contains disallowed characters" + ) safe_transcript_id = urllib.parse.quote(transcript_id, safe="") url = f"{_base_url}/v2/transcript/{safe_transcript_id}" headers = {