litellm/litellm-rust/crates/core/tests
Yujong Lee c404bed9f0 feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks
Add an aws_textract OCR provider on the Rust route, with no Python path. The
detect-document-text model returns plain lines and analyze-document renders
layout and tables as markdown. Both use Textract's synchronous API, so a
multi-page PDF or TIFF is rejected with an error that names the single-page
limit. A call with no region fails instead of falling back to Bedrock's default

SigV4 covers the request body, and host hooks can rewrite that body before it
is sent. litellm-http now has OutboundRequest, which serializes the body once,
shows those bytes to a RequestSigner and is the only thing a route can send.
Chat, audio transcription and OCR build it after their hooks ran, so a callback
that redacts the body still produces a valid Bedrock or Textract signature

ChatCompletionsAuth and AudioTranscriptionAuth are replaced by
litellm_auth::RequestAuth, and one helper in core turns it into a signed or
unsigned request. Audio transcription now signs only the AWS header set and
rejects a forwarded header that SigV4 computes, the same as chat

The OCR catalog routes aws_textract as Rust required, and the dispatch context
reads the provider from the model prefix so a provider scoped rule can match
2026-09-19 09:11:52 -07:00
..
ocr refactor(rust): split custom_httpx into litellm-http and the OCR handler 2026-09-18 20:46:36 -07:00
aws_textract_ocr.rs feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks 2026-09-19 09:11:52 -07:00
azure_ai_ocr.rs refactor(rust): move OCR provider code into litellm-llms and delete core/src/llms 2026-09-17 22:29:08 -07:00
azure_document_intelligence_ocr.rs fix(rust): read OCR env-backed constants instead of hardcoding their defaults 2026-09-18 20:51:55 -07:00
cohere_ocr.rs feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks 2026-09-19 09:11:52 -07:00
deepseek_ocr.rs refactor(rust): move OCR provider code into litellm-llms and delete core/src/llms 2026-09-17 22:29:08 -07:00
ocr.rs fix(rust): resolve Mistral OCR credentials in Python's env order 2026-09-19 07:33:02 -07:00
reducto_ocr.rs refactor(rust): rename litellm-callbacks to litellm-host and HostOpError to InvokeError 2026-09-18 15:45:08 -07:00
vertex_ai_deepseek_ocr.rs refactor(rust): move OCR provider code into litellm-llms and delete core/src/llms 2026-09-17 22:29:08 -07:00
vertex_ai_ocr.rs feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks 2026-09-19 09:11:52 -07:00