Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

refactor(azure-ocr): move urllib.parse.quote to module imports

shivama84c27674fe3
diff --git a/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py b/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py
index 7eb47b03b48..f80252ba6d8 100644
--- a/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py
+++ b/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py
@@ -11,6 +11,7 @@ import asyncio
import re
import time
from typing import Any, Dict, Optional
+from urllib.parse import quote
import httpx
@@ -227,8 +228,6 @@ class AzureDocumentIntelligenceOCRConfig(BaseOCRConfig):
# `optional_params` has already been normalized in `map_ocr_params`.
pages = optional_params.get("pages") if optional_params else None
if pages:
- from urllib.parse import quote
-
url += f"&pages={quote(str(pages), safe=',-')}"
return url