Ë
    uPêjO  ã            	       ó4   — d Z ddlmZ d	dedededz  defd„Zy)
z?HTTP helpers for Azure OpenAI image generation (REST, not SDK).é    )ÚFinalNÚapi_baseÚdataÚdeployment_nameÚreturnc                 óî   — d| v xr d| v }d| v xr t        |«      }|s|s|S |r t        d„ |j                  «       D «       «      ng |j                  «       ¢d|f‘­}|D ��ci c]  \  }}||“Œ
 c}}S c c}}w )u¬  
    Build the JSON body for Azure OpenAI image generation POSTs.

    For ``.../openai/deployments/{deployment}/images/generations``, routing uses the
    deployment in the URL only; sending ``model`` in the body (especially the deployment
    name) breaks some models (e.g. gpt-image-2). See LiteLLM #26316.

    For the v1 surface (``.../openai/v1/images/...``), Azure routes by the deployment
    name in the body ``model`` field, so the deployment name must replace any base
    model name there or Azure answers 404 DeploymentNotFound.

    Provider-style URLs (e.g. ``/providers/...`` for FLUX on Azure AI) keep all keys
    so nonâ€“OpenAI-deployment payloads still work.
    zimages/generationsz/openai/deployments/z/openai/v1/images/c              3   ó6   K  — | ]  \  }}|d k7  sŒ||f–— Œ y­w)ÚmodelN© )Ú.0ÚkÚvs      ús/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/litellm/llms/azure/image_generation/http_utils.pyú	<genexpr>z>azure_deployment_image_generation_json_body.<locals>.<genexpr>   s   è ø€ Ò>™˜˜A°°g³ˆq�!ŒfÑ>ùs   ‚�	r
   )ÚboolÚtupleÚitems)r   r   r   Ú
drop_modelÚv1_routeÚentriesr   r   s           r   Ú+azure_deployment_image_generation_json_bodyr      sŽ   € ð -°Ð8Ò_Ð=SÐW_Ð=_€JØ*¨hÐ6ÒP¼4ÀÓ;P€HÙ™hØˆñ ô 	Ñ> §¡£Ô>Ô>à8ˆt�z‰z‹|Ð8˜g Ð7Ñ8ð ð
 %×%‘T�Q˜ˆAˆq‰DÓ%Ð%ùÓ%s   Á A1)N)Ú__doc__Útypingr   ÚstrÚdictr   r   ó    r   ú<module>r      s4   ðÙ Eå ñ&¸#ð &ÀTð &Ð\_ÐbfÑ\fð &Ðrvô &r   