Merge pull request #21581 from Chesars/fix/azure-doc-intelligence-api-base-env

fix(azure_ai): resolve api_base from env var in Document Intelligence OCR
This commit is contained in:
Cesar Garcia 2026-02-27 17:36:01 -03:00 committed by GitHub
commit f64790c59a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,6 +121,9 @@ class AzureDocumentIntelligenceOCRConfig(BaseOCRConfig):
Returns: Complete URL for Azure DI analyze endpoint
"""
if api_base is None:
api_base = get_secret_str("AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT")
if api_base is None:
raise ValueError(
"Missing Azure Document Intelligence Endpoint - Set AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT environment variable or pass api_base parameter"