File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,13 +214,11 @@ def _extract_model_from_url(self) -> Optional[str]:
214214 return None
215215
216216 try :
217- # Check if this is an Azure OpenAI URL
218- from urllib .parse import urlparse # Local import to avoid scope issues
219217 endpoint_host = urlparse (self .valves .AZURE_AI_ENDPOINT ).hostname or ""
220218 if (
221- ( endpoint_host == "openai.azure.com" or endpoint_host . endswith ( ".openai.azure.com" ))
222- and "/deployments/" in self . valves . AZURE_AI_ENDPOINT
223- ):
219+ endpoint_host == "openai.azure.com"
220+ or endpoint_host . endswith ( ".openai.azure.com" )
221+ ) and "/deployments/" in self . valves . AZURE_AI_ENDPOINT :
224222 # Extract model name from URL pattern
225223 # Pattern: .../deployments/{model}/chat/completions...
226224 parts = self .valves .AZURE_AI_ENDPOINT .split ("/deployments/" )
You can’t perform that action at this time.
0 commit comments