Repository navigation
fix(azure): preserve Entra auth while polling OCR - #40437
Closed
yujonglee-berri wants to merge 2 commits into
Closed
yujonglee-berri wants to merge 2 commits into
yujonglee-berri wants to merge 2 commits into
Conversation
Contributor
Contributor
Greptile SummaryThis PR preserves Azure Document Intelligence request authentication when polling accepted OCR operations
Confidence Score: 5/5The PR appears safe to merge, with the authentication regression covered and the previous typing requirement fully addressed Polling now preserves either supported Azure authentication header without introducing new failures, and the manually resolved previous finding is fully fixed by explicit parameter annotations
|
| Filename | Overview |
|---|---|
| litellm/llms/azure_ai/ocr/document_intelligence/transformation.py | Safely carries accepted-request authentication into SSRF-validated OCR polling requests |
| tests/test_litellm/llms/azure_ai/test_azure_document_intelligence_ocr_transformation.py | Covers subscription-key and Entra polling authentication with strongly typed parameters |
Reviews (2): Last reviewed commit: "test(azure): type OCR polling auth cases" | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
yujonglee-berri
enabled auto-merge (squash)
September 9, 2026 18:29
Contributor
Author
|
@greptile-apps review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
How it solves it:
User Flow
Before: a developer uses Entra authentication for document OCR and the accepted analysis fails while LiteLLM polls for its result
litellm.ocr()withazure_ai/doc-intelligence/prebuilt-layout, an Entra token, and a document URL202 AcceptedUnknown operation status: NoneAfter: the same Entra-authenticated OCR call returns its completed document analysis
litellm.ocr()withazure_ai/doc-intelligence/prebuilt-layout, an Entra token, and a document URL202 AcceptedRelevant issues
Regression from #32018
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Before (096984b)
litellm.ocr()against Azure Document Intelligence with an Azure CLI Entra bearer token and a public PDF202 Accepted, but polling fails withUnknown operation status: NoneAfter (40a01e5)
PYTHONPATH="$PWD" /Users/yujonglee/dev/litellm/.venv/bin/python -m pytest tests/test_litellm/llms/azure_ai/test_azure_document_intelligence_ocr_transformation.py -q34 passed in 0.24slitellm.ocr()against Azure Document Intelligence with the same Azure CLI Entra bearer token and public PDFPOST Azure Document Intelligence OCR via Entra: model=doc-intelligence/prebuilt-layout, pages=2Type
🐛 Bug Fix
Caveats (if any)
Final Attestation