Ë
    uPêjÙ  ã                   ó^   — d Z ddlmZmZmZ ddlmZ erddlmZ de	de
fd„Zde	ded   fd	„Zy
)z—
Common utilities for Azure AI OCR providers.

This module provides routing logic to determine which OCR configuration to use
based on the model name.
é    )ÚTYPE_CHECKINGÚFinalÚOptional)Úverbose_logger)ÚBaseOCRConfigÚmodelÚreturnc                 ó6   — | j                  «       }d|v xs d|v S )aB  Whether an azure_ai OCR model routes to Azure Document Intelligence.

    Azure AI exposes two OCR services on the same provider; the sub-route in the
    model name (`azure_ai/doc-intelligence/<model>`) selects Document Intelligence
    over Mistral OCR. This is the single source of truth for that routing decision.
    zdoc-intelligenceÚdocumentintelligence)Úlower)r   Úlowereds     úk/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/azure_ai/ocr/common_utils.pyÚ$is_azure_document_intelligence_modelr      s%   € ð —[‘[“]€GØ Ð(ÒMÐ,BÀgÐ,MÐMó    r   c                 ó¤   — ddl m} ddlm} t	        | «      rt        j                  d| «        |«       S t        j                  d| «        |«       S )aÀ  
    Determine which Azure AI OCR configuration to use based on the model name.

    Azure AI supports multiple OCR services:
    - Azure Document Intelligence: azure_ai/doc-intelligence/<model>
    - Mistral OCR (via Azure AI): azure_ai/<model>

    Args:
        model: The model name (e.g., "azure_ai/doc-intelligence/prebuilt-read",
               "azure_ai/pixtral-12b-2409")

    Returns:
        OCR configuration instance for the specified model

    Examples:
        >>> get_azure_ai_ocr_config("azure_ai/doc-intelligence/prebuilt-read")
        <AzureDocumentIntelligenceOCRConfig object>

        >>> get_azure_ai_ocr_config("azure_ai/pixtral-12b-2409")
        <AzureAIOCRConfig object>
    r   )Ú"AzureDocumentIntelligenceOCRConfig)ÚAzureAIOCRConfigz4Routing %s to Azure Document Intelligence OCR configz+Routing %s to Azure AI (Mistral) OCR config)Ú>litellm.llms.azure_ai.ocr.document_intelligence.transformationr   Ú(litellm.llms.azure_ai.ocr.transformationr   r   r   Údebug)r   r   r   s      r   Úget_azure_ai_ocr_configr      sN   € õ,õ Jô ,¨EÔ2Ü×ÑÐSÐUZÔ[Ù1Ó3Ð3ô ×ÑÐFÈÔNÙÓÐr   N)Ú__doc__Útypingr   r   r   Úlitellm._loggingr   Ú(litellm.llms.base_llm.ocr.transformationr   ÚstrÚboolr   r   © r   r   ú<module>r      sI   ðñ÷ 2Ñ 1å +áÝFðN°ð N¸ó Nð" 3ð "¨8°OÑ+Dô "r   